Its not recommended to commit the
object-cache.php drop-in to your version control by adding it to your
If you do commit it, its recommended to use a Composer script to keep it up-to-date automatically. This ensure the drop-in stays up-to-date.
"wp redis enable --force"
If WP CLI is not available, you can also automatically update the drop-in after each
composer update as shown below.
"@php -r \"copy('wp-content/plugins/redis-cache-pro/stubs/object-cache.php', 'wp-content/object-cache.php');\""
You might need to adjust the paths above. To test the script run:
composer run post-update-cmd
You may of course use our own deployment script instead of using Composer scripts.