Composer Installation
To install Object Cache Pro using Composer, you’ll need your organization’s license token, which was emailed to you after signing up.
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.
Authentication
First, you’ll need to authenticate with your token to access your Composer repository:
composer config --auth http-basic.objectcache.pro token <LICENSE-TOKEN>;
Alternatively, you can put an auth.json
in your projects’ repository:
{
"http-basic": {
"objectcache.pro": {
"username": "token",
"password": "<LICENSE-TOKEN>"
}
}
}
You may also use the COMPOSER_AUTH
environment variable:
COMPOSER_AUTH='{"http-basic":{"objectcache.pro":{"username":"token","password":"<LICENSE-TOKEN>"}}}'
Repository & Package
Next, add your organization’s own repository to your projects’ composer.json
file:
{
"repositories": [
{
"type": "composer",
"url": "https://objectcache.pro/repo/"
}
]
}
Then install the Object Cache Pro package:
composer require rhubarbgroup/object-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 wp-config.php
file to receive future updates:
define('WP_REDIS_CONFIG', [
'token' => '<YOUR-TOKEN>',
// ...
]);
Activation
Finally, let’s activate the plugin and enable the object cache drop-in.
# activate the plugin
wp plugin activate object-cache-pro
# enable the object cache drop-in
wp redis enable
Then make sure everything works by calling wp redis status
.
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.