Composer Installation

Redis Cache Pro is best installed using Composer. To do so, you’ll need your organization’s name and token, which you received via email after purchasing.

Preparation

Before getting started, make sure you remove any kind of existing object cache from your setup, by deleting the /wp-content/object-cache.php and uninstalling the associated plugin, such as Redis Object Cache or WP Redis.

Once you remove the dropin, it's strongly recommended to flush your Redis database to avoid stale data causing issues.

Authentication

First, you’ll need to authenticate with your token to access your Composer repository:

composer config --global --auth http-basic.rediscachepro.repo.packagist.com token <YOUR-TOKEN>

Alternatively, you can put an auth.json in your projects’ repository:

auth.json
{
"http-basic": {
"rediscachepro.repo.packagist.com": {
"username": "token",
"password": "<YOUR-TOKEN>"
}
}
}

You may also use the COMPOSER_AUTH environment variable:

{"http-basic": {"rediscachepro.repo.packagist.com": {"username": "token", "password": "<YOUR-TOKEN>"}}}

Repository & Package

Next, add your organization’s own repository to your projects’ composer.json file:

composer.json
{
"repositories": [
{
"type": "composer",
"url": "https://rediscachepro.repo.packagist.com/<YOUR-ORG>/"
}
]
}

Then install the Redis Cache Pro package:

composer require tillkruss/redis-cache-pro

Configuration

Now you’ll need to set up your configuration, for more details see the configuration guide.

Be sure to add your organization's license token to your config file to receive future updates:

wp-config.php
define('WP_REDIS_CONFIG', [
'token' => '<YOUR-TOKEN>',
// ...
]);

Activation

Finally, let’s activate the plugin, enable the object cache dropin and flush the cache to avoid stale data.

# activate the plugin
wp plugin activate redis-cache-pro
# enable the object cache dropin
wp redis enable
# flush outdated data
wp cache flush

Then make sure everything works by calling wp redis info. You should see Status: Connected.

Congratulations, you're set up! 🚀🎉

Deployment

To keep the dropin up-to-date, see the deployment guide.