Persistent object caching lets WordPress reuse selected computed values and database results between requests. It can help database-heavy sites, but it requires a supported cache backend and a compatible WordPress integration. Installing a cache plugin alone does not prove that a persistent backend is available or working.
IN THIS ARTICLE
01 Understand the cache layers
WordPress has an object-cache API used during requests. A persistent integration can store those objects beyond one request, commonly through a provided Redis or Memcached service. Page caching stores rendered responses, browser caching reuses downloaded assets, and a CDN can cache content near visitors. These layers solve different problems.
02 Check availability before enabling it
- Ask whether your hosting service provides a supported persistent cache backend and obtain the correct connection details.
- Check the integration's compatibility with the installed WordPress version, PHP environment and important plugins.
- Back up the site and record any existing
object-cache.phpdrop-in and its owner. - Test the supported integration on staging, using an isolated cache namespace or database as required by the provider.
- Verify backend connectivity and a persistent-cache status report before measuring the result.
03 Example: distinguish an enabled cache integration from a healthy backend
In an authorised SSH environment that permits the command, this read-oriented WordPress expression reports whether WordPress considers an external object cache active. Use the selected site path and URL; the restricted Manager command interface may not offer this operation.
wp --path='/home/ACCOUNT/sites/example.com' --url='https://example.com' \
eval 'echo wp_using_ext_object_cache() ? "enabled\n" : "disabled\n";'
An enabled result identifies the WordPress integration state. It does not independently prove that Redis or Memcached is reachable, correctly isolated or delivering a useful hit rate. Check the integration’s own connection report and the assigned backend details without printing credentials. Do not flush a shared cache merely to investigate the flag.
Expected result: The site has one understood object-cache owner, verified backend connectivity and a deliberate namespace. Compare a database-heavy uncached workflow and confirm that checkout, permissions and new content remain correct.
Can I use localhost with any Redis plugin?
No. The backend address, port or socket, authentication and isolation settings must match an actual service available to your account. Do not install an unmanaged server or guess connection values on shared hosting. Avoid exposing a cache service publicly or including credentials in screenshots.
Why did enabling object caching not make every page faster?
A page may already be served from page cache, or its delay may come from large images, third-party scripts, slow external APIs or expensive PHP code. Compare uncached and logged-in workflows as well as public page loads. A persistent cache can also reveal plugin compatibility problems, so test correctness along with speed.
04 Operate and recover carefully
Use one clearly owned object-cache drop-in and document how to disable it through the integration's supported procedure. Purge only the intended site's cache, especially when infrastructure is shared. Verify checkout, permissions and recently updated content after configuration changes. If failures begin, capture connection errors and revert the integration rather than deleting random cache files or changing database records. Backend outages and resource limits should be investigated with the hosting provider.