WordPress caching explained: page, object and browser cache

WordPress caching explained in plain English: page cache, object cache, browser cache, opcode and CDN cache, which ones your site needs and how to avoid conflicts.

Usman Muhammad UsmanUpdated October 13, 2026
WordPress caching explained: page, object and browser cache

Caching means saving work so it does not have to be repeated on every visit. WordPress builds each page from PHP code and database queries, which takes time. Caching layers store the results at different levels so pages load faster and servers handle more visitors. Knowing which layer does what helps you avoid conflicts and broken pages.

Why WordPress needs caching

Without caching, every visit to a WordPress page runs PHP, loads plugins and queries the database before sending HTML. On a busy site or slow server, this makes pages slow and can overload the server during traffic spikes.

Caching reduces the work for most visits. A well-cached site serves most pages in a fraction of the time, improving Time to First Byte and LCP. It is one of the most effective speed improvements for any WordPress site; see how to speed up WordPress.

Page cache

Page caching saves the full HTML of a page after it is generated, then serves that saved copy to the next visitors. This skips PHP and database work completely for cached pages. It has the biggest impact on speed for most sites.

Page caching can happen at the server level, provided by many managed hosts, through a plugin such as WP Rocket, LiteSpeed Cache or W3 Total Cache, or at a CDN edge. Use one page cache layer, not several competing ones. My comparison of caching plugins covers the main options.

Caching layers
LayerWhat it storesHelps most
Page cacheFull HTML pagesAnonymous visitors
Object cacheDatabase query resultsLogged-in users, stores
Browser cacheFiles on the visitor's deviceRepeat views
Opcode cacheCompiled PHPEvery request
CDN cacheFiles near visitorsGlobal audiences

What should not be cached

Pages that change for each visitor must be excluded from page caching: the WooCommerce cart, checkout and account pages, logged-in user pages, membership content and pages with personalised content. Most caching plugins exclude WooCommerce pages automatically, but check your settings.

Forms with security tokens can break when cached pages serve old tokens. If forms fail randomly, check whether the plugin uses nonces and whether the cache lifetime is longer than the nonce lifetime. Many form and caching plugins handle this, but it is a common issue.

Object cache

Object caching stores the results of database queries in memory, using Redis or Memcached, so repeated queries are served instantly. It helps logged-in users, WooCommerce stores, membership sites and admin pages, which cannot use the page cache.

Object caching needs server support and a plugin or drop-in to connect WordPress to Redis or Memcached. Many managed hosts offer it with a click. For simple brochure sites with page caching, the benefit is smaller; for dynamic sites, it can be significant.

Browser cache

Browser caching tells visitors’ browsers to store files such as images, CSS, JavaScript and fonts locally, so they do not need to be downloaded again on the next page or visit. It is controlled by cache headers, such as Cache-Control, sent by the server.

Caching plugins and CDNs set these headers automatically. Long cache lifetimes are safe for versioned files, which most WordPress assets are, because a new version gets a new URL. Check headers in browser DevTools under the Network tab.

Opcode cache

PHP code is compiled before it runs. OPcache stores compiled code in memory so it does not need to be compiled again on every request. It is enabled on most modern hosting by default and requires no configuration from site owners.

If your host does not enable OPcache, ask them to, or consider better hosting. Running a current PHP version also improves performance; see upgrading PHP.

CDN cache

A CDN stores copies of static files, and sometimes full pages, on servers around the world, so visitors download them from a nearby location. This reduces latency for visitors far from your server. Cloudflare, Bunny CDN and host-provided CDNs are common options.

Full-page CDN caching, such as Cloudflare APO or edge caching, can make pages load quickly worldwide but needs careful rules for dynamic pages. My guide to whether you need a CDN explains when it helps.

Avoiding conflicts

The most common caching problems come from running several layers that do the same job, such as a host’s server cache plus a plugin page cache plus a CDN page cache, all with different rules. Stale pages, broken layouts and login problems often follow.

Map your caching layers: which handles pages, objects, browser files and CDN. Disable duplicate features. If your host provides server caching, use their recommended plugin or settings rather than adding another page cache.

Clearing the cache

After updating content, changing the design or updating plugins, clear caches so visitors see the latest version. Most caching plugins clear relevant pages automatically when content is updated, but design changes may need a full purge, including the CDN.

If changes do not appear, clear the plugin cache, server cache and CDN cache in that order, then test in a private browser window. Note that aggressive file optimisation options, such as combining CSS, can also cause issues after updates.

Getting help

Caching is one of the first things I configure on any speed optimization project, matched to the hosting environment and site type. Getting it right avoids both slow pages and stale or broken ones.

If you are choosing hosting, look for server-level page and object caching; see choosing WordPress hosting. For WooCommerce, read how to speed up a slow WooCommerce store.

Key takeaways

  • Page caching gives the biggest speed improvement for most sites.
  • Exclude cart, checkout, account and logged-in pages from page caching.
  • Object caching with Redis helps stores and logged-in users.
  • Use one tool per caching layer to avoid conflicts.

Frequently asked questions

Why does my site look broken after enabling cache?

Often aggressive CSS or JavaScript combining. Turn off those options one at a time to find the cause.

Do I need a caching plugin on managed hosting?

Often not for page caching. Use the host's recommended setup.

What is Redis?

An in-memory data store used for object caching, which speeds up database-heavy pages.

How often should cache be cleared?

Plugins usually clear affected pages automatically. Purge fully after design or plugin changes.

Can caching affect WooCommerce?

Yes, if cart and checkout pages are cached. Make sure they are excluded.

Free website audit

Get a free audit of your website

Tell me your URL and I'll send a short, prioritized list of the speed, SEO and security fixes that will make the biggest difference.

  • No obligation, no sales call
  • 5.0 rating on Google and Upwork
  • Reply within one business day
Written by Muhammad UsmanWeb Development Team Lead with 5+ years building WordPress, WooCommerce, Shopify and Wix websites. Experience · Certificates About me

More on Speed & Core Web Vitals

All Speed & Core Web Vitals articles

Have a project in mind?

Tell me what you're building and I'll reply with next steps and an estimate.