How to Fix “Error Establishing a Redis Connection” in Your WordPress Site

If you’ve encountered the dreaded “Error establishing a Redis connection” message on your WordPress site, you’re not alone. This common issue can be frustrating, especially when it disrupts your site’s functionality and leaves visitors staring at a blank screen. But fear not, as we’re here to guide you through the steps to resolve this error and get your site back up and running smoothly.

In this post, we’ll delve into what exactly causes this error, why it’s related to Redis (a powerful caching system), and most importantly, how to fix it. Whether you’re a seasoned WordPress user or just starting out, understanding and resolving this issue will help you maintain a stable and reliable website. Let’s dive in and troubleshoot together!

Recently one of our users migrated his website from Namecheap Easy WP to our cPanel VPS. But after pointing our DNS to his domain he reported to us that the site was showing an error that said “Error establishing a Redis connection” on a blank white page.
Then our team started an investigation and found the issue within the next 30 minutes. Here I share with you that solution and some more.


Well, if you use Namecheap Easy WP or similar services, they usually use Redis for caching. So, for this, they have a built-in or third-party plugin. But after migrating your site to our hosting or some other hosting where Litespeed technology is common you may face Radis connection error problem.

Step to fix “Error Establishing a Redis Connection”

In this case, go to cPanel file manager and go to your WordPress site wp-content folder then you can find something like this mu-plugins and auto-generated file names object-cache.php

No look, remove them, and refresh your site. Your site is ok now!


Some other solutions for you

Verifying Redis Configuration

1. Access the wp-config.php file in your WordPress installation directory.
2. Find the Redis configuration section.
3. Double-check the accuracy of the host, port, and password values. Confirm that they align with your Redis server settings.

Clearing the Redis Cache File

1. Go to your WordPress installation directory: wp-content/plugins/redis-cache/.
2. Locate the Redis cache file.
3. Delete this cache file to remove any cached data that might be triggering the error.

Hope we saved you some time

Encountering the “Error establishing a Redis connection” in your WordPress site can be a roadblock, but armed with the knowledge from this guide, you’re now equipped to tackle it head-on. Remember, this error is often related to misconfigured Redis settings or cache files, but with the steps outlined here, you can troubleshoot and resolve it efficiently.

By clearing the Redis cache file, verifying the Redis configuration in your wp-config.php file, and ensuring that your server settings match, you’re taking proactive steps to maintain a stable and reliable WordPress site.

We hope this guide has been helpful in not only fixing the immediate issue but also in understanding how Redis works within the WordPress ecosystem. Remember, if you’re ever stuck or need further assistance, don’t hesitate to reach out to your hosting provider or WordPress community forums.

Here’s to smoother, error-free WordPress experiences for you and your visitors. Happy site building!