Redis Object Cache can significantly enhance the performance of database queries, reducing the load on MySQL or MariaDB databases and improving site response time. In some cases, issues may arise during Redis Object Cache plugin upgrades.
I encountered an error message upon updating the Redis Object Cache WordPress plugin on my site. Upon enabling the Redis Object Cache, I received the error message: There has been a critical error on your website. Please check your site admin email inbox for instructions.
“A foreign object cache drop-in was found. To use Redis for object caching, please enable the drop-in.”
Table of Contents
Fix 1 – Flush Redis Object Cache
If the Redis Cache plugin provides an option to flush its cache, try doing so to see if it resolves the issue. If not, proceed to Fix 2.
Fix 2 – Delete and Re-install Redis Cache Plugin
Deactivate and then delete the installed Redis Cache plugin on your WordPress site. Afterward, reinstall the latest version of the plugin and check if the issue has been resolved. If not, proceed to Fix 3.
Fix 3 – Re-Install Redis Server
Before proceeding with the re-installation of Redis Server, we will first delete the Redis Object Cache plugin from the WordPress dashboard and then proceed to reinstall Redis Server on Ubuntu. Let’s review the steps:
Step 1 – Delete Redis Cache Plugin
Deactivate and delete the Redis Object Cache plugin from your WordPress dashboard.
Step 2 – Remove Redis-Server
- Log in to your Ubuntu server and execute the following command to remove Redis-Server.
sudo apt-get purge --auto-remove redis-server
Step 3 – Check Redis Server Status
Once the Redis server has been removed, you can check its status by running the following commands:
Check Redis-Server Status
sudo systemctl status redis
Step 4 – Ping Redis CLI
After running the ‘redis-cli ping‘ command, you will not receive any response as the Redis server has been removed from your Ubuntu Server. If it is installed and working, you can expect a ‘PONG‘ message after running the ‘redis-cli ping‘ command.
Ping redis CLI
sudo redis-cli ping
Step 5 – Update the Server
Use the following commands on Ubuntu server to update it.
Update the server
sudo apt update sudo apt upgrade
Step 6 – Install Redis-Server
Now it’s time to reinstall the Redis server. Use the following command to install the Redis server on Ubuntu:
Install Redis Server
sudo apt install redis-server
Step 7 – Reboot server
Step 8 – Check Redis-Server Status
sudo systemctl status redis
Step 9 – Reinstall the WordPress Redis Object Cache Plugin
Now, reinstall the Redis Object Cache plugin and click ‘Activate’ to enable the plugin:
Now, enable Object Cache again, and this time the status message should display as ‘Connected,’ with the Drop-in marked as ‘Valid‘.
The simplest solution is to deactivate and delete the WordPress plugin and remove and reinstall Redis Server on Ubuntu. While a server restart is advisable, it is not mandatory. For downloading the Redis Object Cache plugin, you can click on the following link: Redis Cache Plugin.