WordPress

How to Configure the Redis Object Cache Plugin on WordPress Hosting at Ecenica

This guide explains how to configure the Redis Object Cache plugin by Rhubarb Group on WordPress hosting provided by Ecenica.

Redis object caching can improve WordPress performance by reducing database queries and speeding up dynamic page generation.

About the Plugin

This guide is specifically for the Redis Object Cache plugin:

Redis Object Cache

Official plugin documentation is available here

Install the Redis Object Cache Plugin

  1. Log into your WordPress Admin area
  2. Go to Plugins > Add New
  3. Search for Redis Object Cache
  4. Install and activate the plugin

Configure Redis for Ecenica Hosting

Ecenica WordPress hosting uses a Unix socket connection for Redis.

Add the following configuration to your wp-config.php file before:

/* That's all, stop editing! Happy publishing. */

Add:

define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/tmp/redis.sock' );
define( 'WP_REDIS_PORT', 0 );

Optional Recommended Configuration

For improved compatibility and performance, you may also add:

define( 'WP_CACHE', true );
define( 'WP_REDIS_CLIENT', 'phpredis' );

Example full configuration:

define( 'WP_CACHE', true );

define( 'WP_REDIS_CLIENT', 'phpredis' );

define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/tmp/redis.sock' );
define( 'WP_REDIS_PORT', 0 );

Enable Object Cache

Once the configuration has been added:

  1. Log into WordPress Admin
  2. Go to Settings > Redis
  3. Click Enable Object Cache

If configured correctly, the plugin should report a successful Redis connection.

Troubleshooting

Connection Failed

If Redis cannot connect:

  • Verify the wp-config.php entries are correct
  • Ensure the configuration is added before the “Happy publishing” comment
  • Confirm Redis is enabled on your hosting account

Cache Status is not active

If the cache status is stuck on disabled, check that your wp-config.php is not blocking plugins from editing local files.

If your config files have the following values set to TRUE, temporarily comment the lines out, or set them to true. Save and publish the changes.

// Security hardening
define( 'DISALLOW_FILE_MODS', true );
define( 'DISALLOW_FILE_EDIT', true );

Now try reactivating the plugin. (Settings > Redis. Click Enable Object Cache)

On success, revert the wp-config changes.

OOM Command Not Allowed Error

If you encounter:

OOM command not allowed when used memory > 'maxmemory'

this indicates the Redis memory allocation has been exhausted. Contact the Ecenica support team for assistance.

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London