Object Cache Pro


Requirements #

Object Cache Pro has a few system requirements, you will need to make sure your server meets these:

Composer Installation #

Object Cache Pro can be installed using Composer, for more information follow the Composer installation guide.

Manual Installation #

Preparation #

Before getting started, be sure to uninstall all existing object cache plugins, such as Redis Object Cache and WP Redis.

Additionally, if a /wp-content/object-cache.php drop-in exists, delete it.

Uploading #

First, you’ll need upload the plugin. You can do that by navigating to Plugins > Add New and then clicking the Upload Plugin button at the top of the screen.

If that doesn’t work, consult the WordPress docs on plugin installation.

Configuration #

You can activate the plugin right away, however before the object cache can be enabled, Object Cache Pro must be configured. This is done using the WP_REDIS_CONFIG constant in you wp-config.php file.

This configuration is a great starting point:

define('WP_REDIS_CONFIG', [
'token' => '<your-license-token>',
// 'host' => '',
// 'port' => 6379,
// 'password' => 'secret',
// 'database' => 0,
'maxttl' => 86400 * 7,
'timeout' => 1.0,
'read_timeout' => 1.0,
'split_alloptions' => true,
'debug' => false,

define('WP_REDIS_DISABLED', false);

For advanced features such as compression and asynchronous flushing, check out the complete list of configuration options.

To connect to Redis clusters or use replication, see the connection guide.

Activation #

Finally, let’s activate the plugin and enable the object cache drop-in.

Be sure to flush your Redis database before proceeding. If Redis contains stale data, your site might become unavailable.

First, if you haven’t already, activate Redis Cache Pro under Plugins.

After activating the plugin, you’ll see the Object Cache Pro widget on your Dashboard. Click on "Enable Object Cache" to enable the drop-in.

You can do this by hand as well, just copy the redis-cache-pro/stubs/object-cache.php file into your wp-content/ directory.

You’ll now see "Status: Connected" in the widget on your Dashboard. If not, head to Tools > Site Health for more information.

That’s it! 🚀🎉

Deployment #

If your site has an automated/scripted deployment process, follow the deployment guide to keep your object-cache.php drop-in up-to-date.