If I could recommend just one upgrade to almost every WordPress site I audit, it wouldn’t be a new theme or a fancy plugin. It would be a persistent object cache. It’s invisible to your visitors, it takes a developer maybe thirty minutes to set up, and it consistently delivers the biggest speed jump of anything I do on a busy site. And after this month’s wp2shell scare, it turns out there’s a security angle too.
Yet in the dashboards I log into every week, I still see the same line under Tools → Site Health: “A persistent object cache is not in use.” Let me explain what that message actually means, why it matters more than ever in 2026, and how I set one up.
What a persistent object cache actually does
Every time someone loads a WordPress page, the code runs dozens of database queries — fetching options, user data, post meta, term relationships, and more. WordPress has always cached the results of these queries, but by default that cache lives only for the duration of a single page load. The moment the page finishes rendering, the cache is thrown away. The next visitor starts from scratch and hammers your database all over again.
A persistent object cache changes that. Instead of discarding query results, it stores them in fast in-memory storage — usually Redis or Memcached — so they survive between requests. The next time WordPress needs that same option or that same expensive query result, it reads it from memory in microseconds instead of asking MySQL again.
The difference is not subtle. On a WooCommerce store or a membership site with a lot of dynamic, non-cacheable pages, I regularly see database query counts drop by 50–90% and time-to-first-byte fall by a couple of hundred milliseconds. That’s the kind of gain that a page-cache plugin alone can’t give you, because page caching does nothing for logged-in users, cart pages, or checkout — and object caching helps all of them.
Why it matters more in 2026
Two things pushed this from “nice to have” to “do it now” for me this year.
1. Dynamic sites are the norm
The sites I build are increasingly logged-in experiences: memberships, courses, customer accounts, B2B stores with custom pricing. Full-page caching barely touches those pages. Object caching is the only layer that speeds up the authenticated, personalized traffic that actually drives revenue.
2. There’s now a defense-in-depth argument
If you follow WordPress security news, you saw the wp2shell vulnerability chain patched in WordPress 7.0.2 on July 17. Buried in the technical write-ups was a detail that caught my eye: the vulnerable code path was reachable specifically when a persistent object cache was not in use. Patching to 7.0.2 (or 6.9.5) is of course the real fix — nothing replaces updating. But it was a sharp reminder that an object cache isn’t only a performance tool; it changes how WordPress executes certain queries, and that can quietly remove attack surface. I’ll take a free layer of hardening that also makes the site faster.
How I set one up
Here’s the workflow I use on client sites. It assumes you have server access or a host that supports Redis; if you’re on shared hosting, skip to the next section.
Step 1: Get Redis running
Most decent managed hosts (Cloudways, Kinsta, SpinupWP, and many VPS setups) either include Redis or let you enable it with a click. On a self-managed server it’s a quick install:
sudo apt install redis-server php-redis
sudo systemctl enable --now redis-server
Confirm it’s alive with redis-cli ping — you want a cheerful PONG back.
Step 2: Connect WordPress to it
I use the free Redis Object Cache plugin by Till Krüss. Install it, then click Enable Object Cache on its settings screen. That single click drops a object-cache.php drop-in into wp-content/ and WordPress immediately starts routing its cache through Redis.
If you prefer to keep credentials out of the database, define the connection in wp-config.php instead:
define( 'WP_REDIS_HOST', '127.0.0.1' );
define( 'WP_REDIS_PORT', 6379 );
define( 'WP_CACHE_KEY_SALT', 'yoursite.com:' );
That WP_CACHE_KEY_SALT line matters if you run more than one site against the same Redis instance — it keeps their cache keys from colliding.
Step 3: Verify it
Go back to Tools → Site Health. The “persistent object cache” warning should be gone. On the Redis Object Cache settings page you’ll now see a live hit ratio — anything above 90% means it’s doing its job. I also like to watch redis-cli info stats for a minute on a live site to confirm keys are actually being read.
If you’re on shared hosting
Plenty of budget hosts don’t offer Redis or Memcached at all. Don’t try to fake it with a disk-based “object cache” plugin — writing cache objects to the filesystem is often slower than just querying MySQL, and I’ve had to rip a few of those out. If your host can’t give you real in-memory caching, that’s usually a sign you’ve outgrown the plan. Moving to a host with Redis is one of the highest-return migrations I do for growing stores.
A few things I’ve learned the hard way
- Flush the cache after big changes. After deploying code, changing options in bulk, or importing products, flush Redis so stale values don’t linger. The plugin has a one-click flush, or use
wp redis flushvia WP-CLI. - Give Redis a memory limit and an eviction policy. Set
maxmemoryandmaxmemory-policy allkeys-lruin your Redis config so it never balloons and takes the server down. - It’s not a substitute for page caching. Object caching and full-page caching solve different problems. Run both — page cache for anonymous visitors, object cache for everyone else.
- Watch it after you enable it. On rare occasions a poorly written plugin caches something it shouldn’t. Keep an eye on the site for a day after switching it on.
The bottom line
A persistent object cache is one of the rare changes that makes a WordPress site meaningfully faster, cheaper to run (less database load means smaller servers), and — as this month reminded us — a touch more resilient. If your Site Health screen still says the cache isn’t in use, that’s the next thing I’d fix. It’s thirty minutes of work for a payoff your visitors will feel on every single page.
If you’re not sure whether your host supports it or how to wire it up safely, that’s exactly the kind of thing I help clients with — feel free to reach out.
Comments
No comments yet. Be the first to share your thoughts!
Leave a Comment