Initial assessment

Failed to initialize object cache: The `WP_REDIS_CONFIG` constant has not been defined.

“Failed to initialize object cache: The WP_REDIS_CONFIG constant has not been defined.” in WordPress: causes and what to check

Updated 2026-11-01
# Common log entries
objectcache.critical: Failed to initialize object cache: The `WP_REDIS_CONFIG` constant has not been defined.

Object Cache Pro shows this message when its drop-in file, wp-content/object-cache.php, is present but wp-config.php does not define WP_REDIS_CONFIG. It is common after a migration: the drop-in moves with wp-content, while the new host’s wp-config.php does not include the Redis settings.

Which of these do you see?

The new host’s wp-config.php has no WP_REDIS_CONFIG block, but wp-content/object-cache.php from the old site is still there.

Deleting the plugin does not delete the drop-in file, and WordPress loads that file on every request.

Common causes

Missing configuration constant: wp-config.php was replaced or rewritten without the WP_REDIS_CONFIG block.
Leftover drop-in: object-cache.php stayed in wp-content after the plugin was removed.
No Redis on the new server: The settings exist, but the new server has no Redis to connect to.

References

  1. WP_Object_Cache (WordPress Developer Resources)
  2. Cache (Advanced Administration Handbook)

Rather not fix it yourself? Let WP119 handle it automatically.

Errors caused by stale cache files or a lost object-cache backend are handled automatically: the system removes the stuck cache files and, when the cache backend is unreachable, removes the leftover configuration. Fixes are made on a copy of your site in the recovery station and written back only after re-verification passes. In your site’s database, the protected tables (members, comments, orders and form submissions) are copied as structure only. In SSH and FTP mode, the system creates a pre-recovery backup on your host before writing back and restores from it if verification after write-back fails. If the recovery cannot be completed, the recovery fee is refunded in full.

  1. Initial assessment: Site URL entry
  2. Copy to the recovery station: Work on a copy
  3. Diagnosis: Item-by-item checks
  4. Recovery and verification: Home and inner pages
  5. Write-back or delivery: Only after verification passes

Use WP119 when this message stops the site or the admin area from loading.

Check my site →
Initial assessment →