Speed

WordPress Caching Explained: How Caching Makes Your Site Faster

A plain-English guide to WordPress caching: page caching, browser caching, object caching, OPcache and CDN caching, which plugin to use, what not to cache and how to clear cache safely.

WordPress Caching Explained: How Caching Makes Your Site Faster
On this page
  1. The main types of caching
  2. Page caching: the big win
  3. Browser caching
  4. Object caching
  5. CDN caching
  6. Choosing a caching setup
  7. What should not be cached
  8. Clearing the cache
  9. Caching won't fix everything
Key takeaways
  • Page caching serves ready-made HTML and is the biggest speed win for most sites.
  • Object caching helps dynamic sites; browser and CDN caching speed repeat visits.
  • Use one caching plugin, exclude cart and checkout, and clear cache after changes.

Every time someone opens a WordPress page, the server normally runs PHP code, queries the database and assembles the page from scratch. Caching saves the finished result so it can be served again instantly. Done right, it's one of the biggest speed improvements you can make.

The main types of caching

TypeWhat it storesWhere it lives
Page cachingComplete HTML pagesServer (plugin or host)
Browser cachingImages, CSS, JS filesThe visitor's browser
Object cachingDatabase query resultsServer memory (Redis, Memcached)
OPcacheCompiled PHP codeServer
CDN cachingFiles and sometimes pagesServers around the world

Page caching: the big win

Page caching saves a ready-made HTML copy of each page. Instead of running WordPress for every visitor, the server hands over the saved copy. For most business websites, whose pages don't change per visitor, this dramatically cuts server response time.

Browser caching

Browser caching tells visitors' browsers to keep files like your logo, fonts and stylesheets for a while, so repeat visits and page-to-page navigation load faster. It's set with cache headers, usually by your caching plugin or host.

Object caching

Object caching stores the results of database queries in memory. It helps most on dynamic sites that can't be fully page-cached: WooCommerce stores, membership sites and sites with many logged-in users. It needs Redis or Memcached support from your host.

CDN caching

A CDN stores copies of your files on servers closer to your visitors; see what is a CDN.

Choosing a caching setup

  • Check your host first: many managed hosts include server-level caching and advise against extra caching plugins
  • LiteSpeed servers: the LiteSpeed Cache plugin works with the server's built-in cache
  • Other servers: a reputable caching plugin such as WP Rocket (paid), W3 Total Cache or WP Super Cache
  • Use only one caching plugin. Two caching plugins fighting each other cause strange errors

What should not be cached

  • Cart, checkout and account pages on WooCommerce
  • Pages for logged-in users
  • Pages showing personalised or frequently changing information
  • Form pages where security tokens are used (test forms after enabling caching)

Good caching plugins exclude standard WooCommerce pages automatically, but always test.

Running an online store? The WooCommerce speed optimisation guide covers cart fragments, object caching and other store-specific fixes.

Clearing the cache

If you update a page and don't see the change, the old cached copy may still be served. Clear the cache from your plugin or hosting panel after design changes, plugin updates or theme edits. Most plugins clear a page's cache automatically when you update it.

Edits not appearing? See WordPress changes not showing.

Caching won't fix everything

Caching speeds up delivery, but huge images, heavy page builders and too many scripts still slow the page in the browser. See why your WordPress site is slow and Core Web Vitals explained.

Want it configured properly? See WordPress speed optimisation.

Need help with your website?

I'm Sameer, a freelance WordPress developer building fast, SEO-friendly websites since 2020. Tell me what you need and I'll reply with a plan and a fixed quote within 24 hours.

Found this useful? Share it:
Contact

Let's build your next website

Available for freelance projects, agency white-label work and long-term maintenance. Feel free to pass this along to your team or company.

Your details are emailed to me, then WhatsApp opens so we can chat right away.

Chat now