Troubleshooting
WordPress Error Establishing a Redis Connection: Causes and How to Fix It

Short answer
This error means the object cache drop-in cannot reach your Redis server. Rename object-cache in wp-content to bring the site back, then check that Redis is running, your connection settings are correct and the PHP Redis extension is installed.
Key takeaways
- The error comes from the object-cache.php drop-in, not WordPress core.
- Renaming the drop-in brings the site back without losing content.
- Wrong host, port, socket or password values break every connection.
- PHP upgrades can leave the phpredis extension missing.
- Graceful fallback keeps the site up during a Redis outage.
What does error establishing a Redis connection mean in WordPress?
It means WordPress tried to load its object cache from Redis, but could not reach the Redis server, so the cache drop-in stopped the page instead of loading it.
The message comes from the object-cache.php drop-in in wp-content, not from WordPress core. A Redis plugin, usually Redis Object Cache, installs that file so WordPress stores cached data in Redis instead of rebuilding it on every request.
When the drop-in cannot connect, it may show an error page that looks similar to the database connection error. The cause is different, though, because your database can be perfectly fine.
The usual reasons are a stopped Redis service, wrong connection details in wp-config.php, a missing PHP extension, or a Redis server that ran out of memory. This guide covers each one.
| Cause | How to spot it | Fix |
|---|---|---|
| Redis service stopped | Ping returns no reply | Start or restart Redis |
| Wrong host, port or socket | Error started after a change or migration | Correct the WP_REDIS settings |
| Wrong or missing password | Server logs mention authentication | Add or fix WP_REDIS_PASSWORD |
| PHP extension missing | Started after a PHP version change | Install phpredis for the new version |
| Redis out of memory | Errors under load, memory near limit | Set a memory limit and eviction policy |
| Leftover drop-in after a move | New host has no Redis at all | Remove object-cache.php |
How do you get your site back online quickly?
Rename or delete the object-cache.php file in wp-content, because WordPress then falls back to its normal per-request cache and loads the site without Redis.
Connect with FTP, SFTP or your host's file manager. Open wp-content and rename object-cache.php to something like object-cache.php.off.
Reload the site. If it loads, Redis was the only problem, and you can fix it without visitors seeing an error page.
This is safe because the object cache only holds temporary copies of data. Nothing is lost when you turn it off, though the site may be a little slower until Redis is back.
Do not delete the Redis plugin folder yet. You will need it to re-enable the drop-in once the connection works.
Is the Redis server running?
Check whether Redis is running first, because a stopped service after a server restart, crash or update is the most common cause of this error.
If you have SSH access, run a quick ping with the Redis command line tool:
redis-cli ping
A healthy server replies with PONG. No reply, or a connection refused message, means Redis is not running or is listening somewhere else.
On most Linux servers, you can check and restart it through the system service manager. The service name varies, often redis or redis-server, so check your server's setup.
On managed hosting, you usually cannot restart Redis yourself. Contact your host, or turn Redis back on from the hosting control panel if it offers a toggle.
Also make sure Redis starts on boot. If the error appears after every server reboot, the service is not enabled to start automatically.
Are the Redis connection settings in wp-config.php correct?
Confirm that the host, port, socket path, database number and password in wp-config.php match what your Redis server actually uses, because one wrong value breaks every connection.
The Redis Object Cache plugin reads settings from constants such as WP_REDIS_HOST, WP_REDIS_PORT, WP_REDIS_PASSWORD and WP_REDIS_DATABASE. If none are set, it tries the default local address and port.
A typical local setup looks like this:
define( 'WP_REDIS_HOST', '127.0.0.1' );
define( 'WP_REDIS_PORT', 6379 );
Many hosts run Redis on a Unix socket instead of a port. In that case, the plugin needs the socket path and scheme set, and the host's documentation gives the exact values.
Place these lines above the comment that tells you to stop editing. Our guide on where to find wp-config.php shows how to open the file safely.
The Redis Object Cache plugin page lists the supported settings. Check it for your version, since option names are added over time.
Does Redis need a password or a different database?
If your Redis server requires authentication, WordPress must send the right password, and if several sites share one server, each site should use its own database number or key prefix.
A password change on the server side breaks the connection straight away. Update WP_REDIS_PASSWORD to match, and check whether your setup also uses a username.
Sharing one Redis server between sites without separation causes strange bugs. One site can read another site's cached options, and flushing the cache on one site clears them all.
Set a unique prefix or database number for each site. The plugin supports both, and your host may already assign them for you.
The official Redis documentation explains authentication and databases if you manage the server yourself.
Is the PHP Redis extension installed?
WordPress can only talk to Redis through a PHP client, so if the phpredis extension is missing for your current PHP version, the connection fails even when Redis itself is running.
This often happens after a PHP upgrade. Each PHP version has its own extensions, and switching from one version to another can leave phpredis behind.
Check your PHP extensions in the hosting panel or under Tools → Site Health → Info → Server. Your host can install the extension for the version your site uses.
The phpredis project is the common C extension. Some plugins can also use a pure PHP client, but it is slower and still needs Redis to be reachable.
If you recently changed PHP versions, our guide on fixing a site broken after a PHP update covers other extensions that may be missing.
Is Redis running out of memory?
Yes, Redis can refuse writes or slow down when it hits its memory limit, which causes connection timeouts and errors that come and go under heavy traffic.
Without a memory limit and eviction policy, Redis can keep growing until the server runs short of RAM. The operating system may then stop the Redis process.
Set a sensible maxmemory value and an eviction policy such as allkeys-lru, so Redis removes old keys instead of failing. Your host or server admin can adjust these.
Long timeouts make things worse. A low connection timeout in the plugin settings means visitors see a fast fallback instead of a slow, hanging page.
If memory keeps running out, the server may simply be too small. Our guide on checking your WordPress memory limit covers the related PHP limits.
Did the error start after a migration?
Errors right after moving hosts usually mean the object-cache.php drop-in came across with your files, but the new server has no Redis or uses different connection details.
Migration plugins and manual copies often include every file in wp-content. The drop-in arrives on the new host and tries to connect to a Redis server that does not exist there.
Remove the drop-in first to get the site loading. Then check whether the new host offers Redis and what settings it needs.
Also remove old Redis constants from wp-config.php if the new host uses different values. Stale settings are easy to forget because they sit quietly until something breaks.
How do you turn Redis back on safely?
Once Redis responds and your settings are correct, re-enable the object cache from the Redis plugin's settings page and check its status shows a working connection.
In the Redis Object Cache plugin, go to Settings → Redis. The status screen shows whether the drop-in is valid and whether the plugin can connect.
Turn the object cache on and load a few pages, including the admin dashboard. Then check the plugin's diagnostics if anything looks wrong.
Flush the cache once after re-enabling. This clears any old data written before the error and prevents odd behaviour from stale values.
Our guide on setting up Redis object cache in WordPress covers the full setup if you are starting from scratch.
How do you stop the Redis error from happening again?
Make Redis start on boot, set a memory limit, keep the PHP extension installed after upgrades, and use the plugin's graceful fallback so a Redis outage slows the site instead of taking it down.
The Redis Object Cache plugin supports a graceful mode through a WP_REDIS_GRACEFUL setting. When it is on, WordPress continues without the cache if Redis is unreachable. Check the plugin docs for its default in your version.
Monitor Redis like any other service. Uptime checks on the site will catch errors, and server monitoring can alert you before memory runs out.
Ask whether you need Redis at all. Small sites with good page caching often gain little from an object cache. Our explainer on what the WordPress object cache is helps you decide.
WordPress's own WP_Object_Cache reference explains how the built-in cache works when no drop-in is present.
How is this different from the database connection error?
The Redis error means the cache server is unreachable, while the database connection error means WordPress cannot reach MySQL or MariaDB, which holds your actual content.
They look similar because both stop the page early. But fixing one does nothing for the other, so read the message carefully.
A quick test settles it. If renaming object-cache.php brings the site back, Redis was the cause. If the site still fails, follow our guide on fixing the error establishing a database connection.
Frequently asked questions
Will deleting object-cache.php break my WordPress site?
No. The file only tells WordPress to store cached data in Redis. Without it, WordPress uses its normal in-memory cache for each request. Your posts, settings and users stay in the database, so nothing is lost, though pages may load a little slower.
Why does the Redis error only happen sometimes?
Errors that come and go usually point to memory pressure, connection timeouts or a Redis server that restarts under load. Check the Redis memory limit and eviction policy, look at server logs for restarts, and ask your host whether the server is short on RAM.
Can I fix the Redis error without SSH access?
Yes. Use FTP or your host's file manager to rename the object-cache drop-in, which brings the site back. Then ask your host to check the Redis service, confirm the connection details and install the PHP Redis extension if it is missing.
Do I need Redis for WordPress?
No. Redis is optional and mainly helps busy sites, stores and membership sites with many logged-in users. Many small sites run well with page caching alone. If Redis keeps causing errors and gives little speed benefit, removing it is a reasonable choice.
Sources
- Redis Object Cache WordPress.org Plugins
- WP_Object_Cache WordPress Developer Resources
- Redis documentation Redis
- phpredis GitHub
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


