WordPress: Error establishing a Redis connection (object cache)
The persistent object cache drop-in (object-cache.php) can’t connect to Redis, so the whole site fails.
Seen on:
WordPress
Meaning
Redis Object Cache and similar plugins install wp-content/object-cache.php. If Redis stops, credentials/host change, or the site moves to a server without Redis, every request errors.
Common causes
- Redis server stopped or not installed
- Wrong WP_REDIS_HOST/PORT/password
- Migrated site still has object-cache.php
- Socket path or permissions wrong
⚡ Quick fix
- Start Redis (systemctl start redis-server)
- Fix WP_REDIS_* constants
- Temporarily delete wp-content/object-cache.php to restore the site
Detailed fix by platform
Linux
- bash
sudo systemctl status redis-server redis-cli ping mv wp-content/object-cache.php wp-content/object-cache.php.off
How to diagnose
- Redis — Running?
- Config — WP_REDIS_* values
- Drop-in — object-cache.php present?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in WordPress
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026