Installation

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' => '127.0.0.1',
    'port' => 6379,
    'database' => 0, // change for each site
    'maxttl' => 86400 * 7,
    'timeout' => 1.0,
    'read_timeout' => 1.0,
    // 'prefetch' => true,
    // '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.

First, if you haven’t already, activate Object 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 object-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.