Black FridayCyber Monday 2026
14Days
15Hrs
34Mins
43Secs
Flat20% OFF

Our biggest sale of the year20% off the first payment on all maintenance plans. Code BF2026

Grab the deal
WordPress

WordPress Caching Explained: Page Cache, Object Cache, Browser Cache and CDN

Caching has four layers that each solve a different problem. Learn what page, object, browser and CDN caches do, and what to exclude on a store.

wpallsolution 6 min read

WordPress caching means keeping a ready-made copy of something so it does not have to be rebuilt or downloaded again. There is no single “cache”: a WordPress site can use a page cache, an object cache, the visitor’s browser cache and a CDN, and each solves a different problem. Mixing them up is why people see old content after an edit, a broken cart on a store, or no speed gain at all. This guide explains the four layers in plain terms, what to exclude on dynamic sites such as stores, and how to purge them in a sensible order.

Quick answer

A page cache stores finished HTML pages so WordPress and the database do not run for every visit. An object cache stores the results of database lookups in memory, and WordPress’s is not persistent unless you add a backend. The browser cache keeps files on the visitor’s device according to HTTP headers, and a CDN is a shared cache close to visitors. Use a page cache on almost every site, exclude cart, checkout and account pages on stores, add a persistent object cache only if your host supports it and your site needs it, set sensible browser cache headers, and purge from the origin outward after a change.

How this guide was prepared: it is research-based. We used the MDN HTTP caching guide, the WordPress object cache reference and the WooCommerce caching guidance listed under Sources, checked on October 23, 2026, plus our own use of a server-level cache plugin on this website. We did not test your hosting, and results vary by site.

The four layers

LayerWhat it storesWhereHelps with
Page cacheFinished HTML pagesOn your server, a plugin or a server-level cacheSlow page builds, high server load
Object cacheResults of database queries and computed dataIn memory on your serverRepeated database work, slow admin
Browser cacheImages, styles, scripts and sometimes HTMLThe visitor’s deviceRepeat visits and page navigation
CDN (shared cache)Files, and sometimes pages, copied near visitorsServers around the worldDistance, traffic spikes

The decision tree: which cache solves your problem?

Flowchart for WordPress caching: five questions about slow page builds, database queries, repeat downloads, distance and stale content
Five questions show which cache layer helps.
  1. Pages slow because WordPress builds each one? Use a page cache (Step 1).
  2. Same database results fetched again and again? Consider a persistent object cache (Step 2).
  3. Returning visitors re-download files? Set browser cache headers (Step 3).
  4. Visitors far from your server? Use a CDN (Step 4).
  5. Old content or a broken cart? Check exclusions and purge in order (Step 5).

6 steps to understand and set up caching

Step 1: Page cache

Without a page cache, WordPress runs PHP and queries the database for every visit. A page cache saves the finished HTML and serves it directly, which usually makes the biggest difference for public pages. It can run in a plugin or in the web server itself; on this website we use a server-level cache plugin. The catch is that a cached page is the same for everyone, so it must not be used for pages that differ per visitor.

Step 2: Object cache

WordPress’s object cache stores computed results in memory so they need not be fetched from the database again. The WordPress reference says it is non-persistent by default: the data lives only for one request. Persistence needs a backend plugin such as Redis or Memcached, and defining WP_CACHE in wp-config.php does nothing on its own. A persistent object cache helps busy, dynamic sites, such as stores, the most; for a small brochure site it adds little. Without one, the Transients API falls back to the options table. See WordPress database cleanup for what lives there.

Step 3: Browser cache

The visitor’s browser keeps files according to the HTTP headers your server sends. MDN explains Cache-Control: max-age says how long a file stays fresh, no-store forbids storing, no-cache allows storing but requires revalidation, private limits storage to the browser and immutable tells the browser not to revalidate a file that never changes. An ETag lets the browser ask whether a file changed and receive a short 304 answer if not. Long lifetimes are safe for files whose names change when they change, such as versioned assets.

Step 4: CDN

MDN describes a CDN as a managed shared cache between visitors and your server. It copies your files, and sometimes pages, to servers close to visitors, which cuts delay and absorbs traffic. A CDN can be purged when content changes, which an ordinary proxy cannot. Check that it respects your cache headers and does not store private pages.

Step 5: Exclusions on dynamic sites

WooCommerce’s documentation says the Cart, My Account and Checkout pages must be excluded from page caching, and that caching must also ignore the cookies woocommerce_items_in_cart and wp_woocommerce_session_. Many caching plugins already do this, but verify it. Membership sites, logged-in areas and pages with personal content need the same care. If checkout breaks after enabling a cache, see WooCommerce cart empty after adding products and WooCommerce checkout not working.

Step 6: Purge in a fixed order, then test

When you change something and still see the old version, clear caches from the origin outward: your page builder’s generated files, the object cache, the page cache, the host or server cache, the CDN, and finally your browser. Test in a private window. For Elementor specifically, see Elementor changes not showing. After any caching change, test login, forms and checkout.

Version and hosting differences

  • Many hosts provide their own page cache, so a second caching plugin can conflict; ask your host what is already running.
  • Persistent object caching needs support from the host, such as a Redis or Memcached service.
  • A CDN in front of the site adds its own cache rules, so purge it too.

How to verify your caching

  • A second request to a public page is faster than the first, and the response headers show a cache hit if your tool reports them.
  • Cart, checkout, account and logged-in pages are not cached.
  • A change you make appears after you purge in order.

Common mistakes

  • Running two page caches at once.
  • Caching the cart, checkout or account pages.
  • Setting a long browser cache for files whose names never change.
  • Expecting caching to fix slow scripts; see Interaction to Next Paint in WordPress.

Frequently asked questions

Which cache should I start with?

A page cache, usually from your host or a plugin, because it helps most public pages.

Do I need Redis?

Only if your site is dynamic and busy and your host supports it. Many sites do not need it.

Why do I see old content?

One of the layers still holds an old copy. Purge from the origin outward.

Does a CDN replace a page cache?

No. They work together: the page cache reduces work on your server, and the CDN reduces distance.

What to do next

List which layers you use, check the exclusions and fix the purge order. If you would like help, wpallsolution offers WordPress maintenance packages with speed work in the higher tiers. We cannot promise a speed result.

Sources and official documentation

Keep reading

More guides

Need a hand with this?

Tell us what is happening. We reply with honest next steps.

Talk to us