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
# 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
References
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.
- Initial assessment: Site URL entry
- Copy to the recovery station: Work on a copy
- Diagnosis: Item-by-item checks
- Recovery and verification: Home and inner pages
- 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 →