A foreign object cache drop-in was found. To use Redis for object caching, please enable the drop-in.

Overview

Recently I got this error message when I updated Redis Object Cache wordpress plugin on my site. As soon as I enabled Redis Object Cache, I got 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.”

There has been a critical error on your website. Please check your site admin email inbox for instructions

You can try to deactivate redis object cache plugin or delete it completely and then re-install it to check if it fixes your issue. Try to Flush Redis Object Cache as well if the wordpress redis object cache plugin allows. If you are using Ubuntu server where you have installed Redis then you can use also use below steps to fix this issue:

Solution

To be able to fix this issue, you can first remove the plugin completely from WordPress Site by deactivating it and delete it. Then login on your Ubuntu server and run below command to remove redis server:

Remove Redis-Server

sudo apt-get purge --auto-remove redis-server
sudo apt-get purge --auto-remove redis-server

Check Redis-Server Status

Once the redis-server has been removed, you can check the status of the it by running below commands:

sudo systemctl status redis
sudo systemctl status redis

You will not be able to get any response as the redis has been removed from your Ubuntu server.

sudo redis-cli ping

After running redis-cli ping command you will not get any response as the redis server has been removed from your Ubuntu Server. If its installed and working you can expect PONG message after running redis-cli ping command.

Update the server

sudo apt update
sudo apt upgrade

Install Redis-Server

sudo apt install redis-server

Reboot server

sudo reboot

Check Redis-Server Status

sudo systemctl status redis
sudo systemctl status redis

Reinstall WordPress Redis Object cache plugin

Now, you can re-install Redis Object cache plugin and click on Activate to Activate the plugin:

Redis Object Cache WordPress Plugin Activate

Now, Enable Object Cache again and this time the status message should show as Connected, Drop-in as Valid.

Redis Object Cache WordPress Plugin Activate Enable Cache

Conclusion

Redis Object cache can definitely speed up the performance of database queries to reduce the load on mysql or mariadb database. It also reduces the response time of the site. However, sometimes you may encounter issues when upgrading Redis Object Cache plugin and therefore the simplest way to fix this is deactivate and delete the wordpress plugin, Remove and Re-install Redis server from Ubuntu. Server Restart is advisable but not mandatory. For Downloading Redis Object cache, you can also click on below link: https://en-gb.wordpress.org/plugins/redis-cache/.

Leave a Comment