WordPress Caching Explained: Page, Object, Browser and CDN
The four layers of WordPress caching, what each one speeds up, how they work together, which pages must never be cached, and how to clear and test caches correctly.

WordPress caching stores the results of expensive work so it does not have to be repeated on every request. There are four main layers: a page cache stores full HTML pages, an object cache stores database query results in memory, the browser cache keeps static files on the visitor's device, and a CDN serves cached files from servers near the visitor. PHP's opcode cache also stores compiled code. Each layer solves a different bottleneck, and most fast sites use all of them.
The caching layers
| Layer | What it stores | Speeds up | Typical tools |
|---|---|---|---|
| Browser cache | CSS, JS, images, fonts | Repeat visits | Cache-Control headers |
| CDN | Static files, sometimes HTML | Distance and server load | Cloudflare, Bunny, Fastly |
| Page cache | Rendered HTML | Server response time (TTFB) | Host cache, LiteSpeed Cache, WP Rocket, Nginx FastCGI |
| Object cache | Query and computed results | Dynamic pages, admin, logged-in users | Redis, Memcached |
| Opcode cache | Compiled PHP | All PHP execution | OPcache |
Page cache
Without a page cache, every visit runs PHP and dozens of queries to build the same HTML. With one, the first visit builds the page and later visitors get the stored copy, often in milliseconds. It is the biggest single improvement for most content sites and directly improves time to first byte (reduce TTFB).
Never cache pages that differ per user: cart, checkout, my account, logged-in dashboards, course progress pages and anything showing a nonce. Good caching plugins and hosts exclude logged-in users and common e-commerce pages automatically, but check custom pages.
Object cache
WordPress has a built-in object cache that lasts only for one request. A persistent object cache such as Redis keeps those results between requests, so repeated queries for options, menus and post data come from memory. It helps most where a page cache cannot: logged-in users, WooCommerce, LMS dashboards and the admin. Setup is covered in Redis object cache for WordPress.
Browser cache and CDN
Set long cache lifetimes for versioned static files (a year is common), and short or no caching for HTML. WordPress adds ?ver= to enqueued files, so updates still reach visitors. A CDN copies those files to edge locations worldwide; some CDNs can cache HTML too, with rules to bypass logged-in sessions (CDN setup).
Clearing caches correctly
- Clear from the inside out: object cache (if data changed), page cache, then CDN.
- Most caching plugins purge affected pages automatically when you publish or update.
- After a theme or plugin update, purge everything once.
- Browser caches cannot be purged remotely, which is why versioned file names matter.
How to test caching
- Check response headers in browser developer tools for cache status (for example
x-cache: HITorcf-cache-status: HIT). - Compare TTFB on the first and second load in a private window.
- Use Query Monitor to see object cache hit rates when logged in.
Common mistakes
- Running two page caching plugins at once.
- Caching cart, checkout or account pages, so users see others' data.
- Stacking a plugin cache on top of a host's server cache without coordination.
- Expecting caching to fix a slow, uncached admin or heavy queries; those need code and database fixes.
- Forgetting to purge the CDN after changes.
Frequently asked questions
Which cache matters most?
For content sites, the page cache. For stores, membership and LMS sites with many logged-in users, the object cache becomes just as important.
Does caching help SEO?
Indirectly. Faster responses improve user experience and Core Web Vitals, and help crawlers fetch pages efficiently (Core Web Vitals).
Do I need a caching plugin if my host caches?
Often not for page caching. You may still use a plugin for file optimisation; disable its page cache to avoid conflicts.
Why do changes not show after I update a page?
A cache layer is serving the old copy. Purge the page cache and CDN, then reload.
Conclusion
Use a page cache for anonymous visitors, a persistent object cache for dynamic and logged-in traffic, long browser caching for versioned assets, and a CDN for reach. Then compare options in the best caching plugins and the wider speed guide. References: the WordPress caching documentation and MDN on HTTP caching. LMS sites should also see our Redis guide for course platforms, and keep security in mind when caching personalised pages.
Want your caching configured and tested? See our speed optimization service.
Save this practical guide
Add us as a preferred Google source, or ask an AI assistant to summarize this page and link back to the original guide when it is useful.
