Object Caching WordPress - When It Helps and How to Turn It On (2026)
Page caching speeds up pages that look the same for everyone. Object caching speeds up the pages that can't be cached that way, like carts, dashboards and the admin area, by keeping database results in memory.
What Object Caching Does
WordPress stores almost everything in its database: posts, settings, menus, user data, product details. Building a page can involve dozens or hundreds of database queries, and many of them ask the same questions on every request.
WordPress has a built-in object cache that remembers query results, but only for the duration of a single page load. When the request finishes, that memory is thrown away, and the next request asks the database all over again.
A persistent object cache keeps those results in fast server memory, using Redis or Memcached, between requests. The next visitor's request finds the answers already stored and skips many database queries.
Object Cache vs Page Cache
| Page Cache | Object Cache | |
|---|---|---|
| What it stores | Complete HTML pages | Individual database query results |
| Where it lives | Disk or memory | Server memory (Redis or Memcached) |
| Helps | Anonymous visitors on cacheable pages | Uncached pages, logged-in users, admin, carts |
| Set up by | Caching plugin or host | Host provides Redis or Memcached; a plugin connects WordPress |
| Typical impact | Very large on cacheable pages | Moderate to large on dynamic pages |
They complement each other. Page caching handles the bulk of anonymous traffic; object caching speeds up everything that page caching has to skip.
Who Benefits Most
WooCommerce stores
Carts, checkouts, account pages and product filters aren't page-cached, and they query the database heavily. See speeding up WooCommerce.
Membership and course sites
Logged-in members see personalized pages that skip page caching.
Forums and communities
Lots of dynamic, user-specific content.
Busy admin areas
Editors working in the dashboard all day feel faster responses. See speeding up the WordPress admin.
Sites with heavy plugins
Plugins that store lots of options and run many queries benefit from cached results.
If your site is mostly blog posts read by anonymous visitors, page caching already handles nearly all traffic, and object caching adds little.
Redis vs Memcached
Both store data in memory and both work with WordPress. Redis is the more common choice today.
| Redis | Memcached | |
|---|---|---|
| Data types | Rich (strings, lists, hashes and more) | Simple key-value |
| Persistence | Can save data to disk | Memory only |
| WordPress plugins | Widely supported (e.g., Redis Object Cache) | Supported through drop-ins |
| Host availability | Very common on managed and cloud hosts | Available on some hosts |
| Our default | Use Redis if your host offers it | Fine if it's what your host provides |
Some LiteSpeed hosts provide their own memory cache compatible with Memcached; Hostinger, for example, uses LiteSpeed's memcached server on higher plans.
How to Enable Object Caching
The exact steps depend on your host, because the Redis or Memcached server has to exist first. A plugin alone can't create it.
Check your host
Look in your hosting dashboard for Redis or Memcached, or ask support. Many managed and cloud hosts offer it as a toggle or add-on.
Enable the service
Turn on Redis or Memcached in your hosting panel.
Connect WordPress
Install the plugin your host recommends, such as Redis Object Cache, or use your host's own integration. It adds an object-cache.php drop-in.
Enable the object cache
In the plugin's settings, enable it and check the status shows connected.
Test
Browse logged in, test your cart and checkout, and watch for errors.
If your site shares a Redis server with others, each site needs its own key prefix or database, which your host's integration usually handles.
Object Caching With WP Rocket
WP Rocket doesn't include object caching. It focuses on page caching and front-end optimization, and works well alongside a separate object cache. The two don't conflict: WP Rocket serves cached pages to anonymous visitors, while Redis speeds up whatever WP Rocket can't cache.
If you use W3 Total Cache or LiteSpeed Cache for object caching and switch to WP Rocket, keep the object cache through your host's recommended plugin rather than leaving the old plugin active. See WP Rocket vs W3 Total Cache.
A Worked Example: A Slow WooCommerce Account Area
A store's product pages are fast for visitors, thanks to page caching. But customers complain that the account dashboard and order history are slow, and the admin is sluggish for staff during busy periods.
Query Monitor shows several hundred database queries on account pages, many repeated across requests. The host offers Redis as an add-on, so the owner enables it and installs the recommended object cache plugin. Repeat queries are now answered from memory, the account area responds noticeably faster and the admin feels quicker for staff. Page caching for anonymous visitors carries on unchanged.
Object Caching on Different Hosts
| Hosting Type | Typical Availability |
|---|---|
| Budget shared hosting | Often unavailable or limited |
| LiteSpeed shared hosting | Sometimes available through LiteSpeed's memory cache on higher plans |
| Managed WordPress hosting | Commonly available as an add-on or included |
| Cloud VPS panels | Usually available; you enable Redis on the server |
| Self-managed servers | Install Redis or Memcached yourself |
If your host doesn't offer it, there's no safe workaround inside WordPress alone: a persistent object cache needs a memory store on the server. In that case, focus on page caching, database cleanup and fewer heavy plugins.
What Object Caching Won't Fix
Object caching reduces database work, but it doesn't speed up:
- Slow external API calls made by plugins.
- Heavy PHP processing that doesn't involve the database.
- Front-end issues: CSS, JavaScript, images and layout shifts.
- Slow queries that run once and are never repeated.
If a specific page is slow, Query Monitor helps show whether the time goes to database queries, HTTP requests or PHP. See finding plugins that slow WordPress.
How to Tell If It's Working
- The object cache plugin's status page shows a connection and, often, hit ratios.
- Query Monitor, a free debugging plugin, shows database query counts. With object caching working, repeat loads should run fewer queries.
- Logged-in pages and the admin feel quicker, especially pages with many settings or products.
A low hit ratio means the cache isn't helping much, often because data changes constantly or a plugin bypasses the cache.
Potential Problems
Stale data
Rarely, a plugin that writes to the database directly can leave outdated values in the cache. Flushing the object cache fixes it.
Memory limits
If Redis runs out of memory, older entries are evicted. Ask your host about the memory allocated.
Plugin conflicts
Only one object-cache.php drop-in can exist. Don't run two object cache plugins.
Bad actors
Some plugins store huge amounts of data in the cache. Excessive cache calls can slow pages instead of speeding them up.
Object Caching and Autoloaded Options
WordPress loads "autoloaded" options on every request. On sites with bloated autoload data, object caching stores that big chunk in memory, but the real fix is reducing it. See reducing autoloaded options and database optimization.
Object Caching WordPress FAQ
What is object caching in WordPress?
It stores the results of database queries in memory so they can be reused across requests, reducing database work on dynamic pages.
Do I need object caching if I have page caching?
Only if you have many uncached requests, such as a store, membership site or busy admin area. Mostly anonymous sites gain little.
Is Redis better than Memcached?
Redis is more common and flexible, but either works well. Use whichever your host supports.
Does WP Rocket include object caching?
No. Use your host's Redis or Memcached with a dedicated plugin alongside WP Rocket.