Error establishing a Redis connection 📝 WordPress

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

  1. Start Redis (systemctl start redis-server)
  2. Fix WP_REDIS_* constants
  3. Temporarily delete wp-content/object-cache.php to restore the site

Detailed fix by platform

Linux

  1. bash
    sudo systemctl status redis-server
    redis-cli ping
    mv wp-content/object-cache.php wp-content/object-cache.php.off

How to diagnose

  1. Redis — Running?
  2. Config — WP_REDIS_* values
  3. 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:

🧠 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.