WordPress Caching Explained: Page, Browser, Object, OPcache and CDN Caching (and What Not to Cache)
WordPress caching in plain English: page, browser, object (Redis), OPcache, CDN and server caching, which to use, what not to cache, how to clear and test.

On this page
- The main types of caching
- Page caching: the big win
- Server-level caching on hosts like Hostinger
- Browser caching
- Object caching with Redis or Memcached
- OPcache
- CDN caching
- Choosing a caching setup
- Server-side caching vs plugin caching in WordPress
- How to set up WordPress caching step by step
- What not to cache
- How to clear the cache
- How to test that caching works
- Common caching mistakes
- Caching won't fix everything
- Quick check: is caching working?
- When to get help
- FAQs
- WordPress cache means saved copies of pages, files, queries and compiled PHP; page caching from your host or one plugin gives the biggest speed gain.
- Server-side caching (LiteSpeed, Nginx, Varnish) is usually faster than plugin-only caching; use one page cache, never two.
- Never cache cart, checkout, account or logged-in pages, clear caches in order (plugin, server, CDN, browser) and test while logged out.
Short answer: WordPress cache is a saved copy of work WordPress has already done, such as a finished HTML page, a database result or compiled PHP, so the next visitor gets it instantly. For most sites the best setup is server-side page caching from the host (or one caching plugin), browser caching for files, and object caching on stores and membership sites.
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 result of that work so it can be reused instead of rebuilt. Done right, it's one of the biggest speed improvements you can make; done wrong, it shows visitors stale pages or breaks forms and carts.
The main types of caching
| Type | What it stores | Where it lives | Helps most with |
|---|---|---|---|
| Page caching | Complete HTML pages | Server (plugin or host) | Server response time for visitors who aren't logged in |
| Browser caching | Images, CSS, JavaScript, fonts | The visitor's browser | Repeat visits and moving between pages |
| Object caching | Results of database queries | Server memory (Redis, Memcached) | Stores, memberships, logged-in users, the admin |
| OPcache | Compiled PHP code | Server memory | Every request that runs PHP |
| CDN caching | Files, and sometimes whole pages | Servers around the world | Visitors far from your server, traffic spikes |
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 look the same to every visitor, this cuts server response time dramatically; see how to reduce server response time.
Page caching can be done by a plugin, which saves HTML files that the server sends, or at server level, where the web server itself (for example LiteSpeed, Nginx or Varnish) serves cached pages before WordPress even loads. Server-level caching is usually faster. Useful settings to look for:
- Cache lifespan: how long a copy is kept before it's rebuilt
- Preloading: building cached copies in advance so the first visitor doesn't get a slow, uncached page
- Automatic purging: clearing a page's cache when you update it
- Separate mobile cache: only needed if your theme serves different HTML to phones
Server-level caching on hosts like Hostinger
Many hosts now build caching into the server, so check what yours provides before installing anything:
- LiteSpeed servers: hosts that run LiteSpeed, which has included many Hostinger plans, pair the server's built-in cache with the free LiteSpeed Cache plugin. The plugin controls the server cache rather than creating its own, and also handles extras like image and CSS optimisation. Check your hosting panel to confirm which server your plan uses
- Hosting panel caches: some panels, Hostinger's hPanel among them, have their own cache settings and a purge button; check the current docs for where these live
- Managed WordPress hosts: many run their own page caching and advise against, or block, other caching plugins
If a LiteSpeed-hosted site is still slow, see WordPress site slow on Hostinger.
Browser caching
Browser caching tells visitors' browsers to keep files like your logo, fonts and stylesheets for a set time, so repeat visits and page-to-page navigation load faster. It's set with cache headers, usually by your caching plugin or host. Static files can be cached for a long time because WordPress and most plugins add version numbers to file addresses when they change. The HTML page itself should have a short browser lifespan, or visitors may keep seeing an old version.
Object caching with Redis or Memcached
WordPress already caches database results in memory, but only for the length of a single page load. A persistent object cache keeps those results in Redis or Memcached between requests, so repeated queries for menus, settings and product data don't hit the database every time.
- It helps most on pages that can't be page-cached: WooCommerce cart and checkout, membership and course sites, and the admin
- It needs Redis or Memcached on the server plus a connector plugin, so check your host supports it; WordPress's Site Health screen may suggest it
- It isn't a fix for slow, bloated queries; see WordPress database optimisation
On a WordPress Multisite network, object caching often matters even more because so much data is shared; see why WordPress Multisite gets slow.
OPcache
PHP is compiled before it runs. OPcache keeps the compiled code in server memory, so PHP doesn't recompile WordPress files on every request. It's a server setting rather than something a plugin does, and most decent hosts enable it. If you're unsure, ask your host or check the PHP settings in your hosting panel.
CDN caching
A CDN stores copies of your files on servers closer to your visitors, which helps when they are spread across India or abroad. Most CDNs cache images, CSS and JavaScript by default; caching whole HTML pages at the CDN is possible but needs careful rules so dynamic pages are never served from the edge. See what is a CDN.
Choosing a caching setup
| Your site | A sensible setup |
|---|---|
| Business site on a LiteSpeed host | LiteSpeed Cache plugin with the server cache, browser caching, optional CDN |
| Business site on another shared host | One reputable caching plugin, such as WP Rocket (paid), W3 Total Cache or WP Super Cache |
| Managed WordPress hosting | The host's built-in caching; add only what the host allows |
| WooCommerce store | Page caching with store exclusions, object caching, CDN for images |
| Membership or course site | Object caching, with page caching for logged-out visitors only |
Whatever you choose, use only one page-caching plugin. Two caching plugins fighting each other cause strange errors and stale pages.
Server-side caching vs plugin caching in WordPress
"Server-side caching" in WordPress usually means the web server or host stores and serves the cached page, while plugin caching means a WordPress plugin writes the cached files. Many setups combine both, with the plugin acting as a control panel for the server cache.
| Point | Server-side caching | Plugin-only caching |
|---|---|---|
| Who serves the cached page | The web server (LiteSpeed, Nginx, Varnish) before PHP runs | The server reads files the plugin saved, often via rewrite rules |
| Speed | Usually the fastest | Fast, but depends on the server configuration |
| Setup | Enabled by the host; controlled from the panel or a companion plugin | Install and configure the plugin yourself |
| Best for | LiteSpeed hosting, managed WordPress hosting, VPS setups | Shared hosting without a built-in cache |
How to set up WordPress caching step by step
- Check what your host already provides in the hosting panel or documentation: server cache, object cache, CDN.
- Remove extra caching plugins so only one page cache remains.
- Turn on page caching with preloading and automatic purging on updates.
- Confirm exclusions for cart, checkout, My Account, login and logged-in users.
- Enable browser caching for static files, keeping HTML short-lived.
- Add object caching with Redis or Memcached if you run a store or membership site and the host supports it.
- Switch on file optimisation one option at a time (minify, defer, delay) and check the layout after each.
- Test while logged out using the checks below, and submit every form.
For Indian sites on shared hosting, steps 1 and 2 solve more problems than any single setting: a host cache plus a second caching plugin is a common cause of stale pages and broken checkouts.
What not to cache
- WooCommerce cart, checkout and My Account pages: these are different for every shopper, and caching them can show one customer another's cart or details
- Logged-in users: they see admin bars, account details and personalised content
- Shoppers with items in the cart: WooCommerce sets cookies that caching tools normally use to bypass the cache, so don't override that
- Personalised or fast-changing content: pages based on location, live stock or prices that change by the minute
- The admin area and login page
Forms need care too. WordPress security tokens (nonces) generally expire within a day, so a page cached for longer can serve an expired token and the form fails. Keep the cache lifespan shorter than that on form pages, or use a plugin that handles it, and test forms after enabling caching. Good caching plugins exclude standard WooCommerce pages automatically, but always check. For store-specific fixes, see the WooCommerce speed optimisation guide.
How to clear the cache
If you update a page and don't see the change, an old cached copy is probably being served. Clear the layers in this order:
- Plugin cache: use your caching plugin's purge option
- Server cache: purge from your hosting panel if it has its own cache
- CDN cache: purge the changed files or the whole site from the CDN dashboard
- Browser cache: hard refresh (Ctrl+Shift+R on Windows, Cmd+Shift+R on Mac) or check in a private window
Clear the cache after design changes, theme edits and plugin updates. Most plugins clear a page's cache automatically when you update it, but not always for menus, widgets or global styles. Edits not appearing? See WordPress changes not showing, and for stylesheets specifically, CSS changes not showing.
How to test that caching works
- Log out, or use a private window, because logged-in users usually bypass the cache
- Load a page twice; the first visit may build the cache
- Open your browser's developer tools, go to the Network tab, click the page request and check the response headers. Look for headers such as
x-litespeed-cache: hit,cf-cache-status: HIT,x-cacheorage; names vary by host and CDN - Compare server response time before and after with a speed tool; see website speed test tools explained
- Submit every form, and on a store add a product to the cart in one browser and check a second browser doesn't show it
Common caching mistakes
- Running two caching plugins, or a caching plugin on a host that already caches
- Caching cart, checkout or account pages
- Turning on every minify and combine option at once, then not knowing what broke the layout
- Testing only while logged in, and concluding caching does nothing
- Forgetting the CDN when clearing caches after a change
Caching won't fix everything
Quick check: is caching working?
- Open your page in a private window, then open Chrome DevTools (F12) Network tab, click the page itself and look for a cache header such as "x-cache", "cf-cache-status" or "x-litespeed-cache".
- Run the page through PageSpeed Insights (pagespeed.web.dev) and read the Mobile tab first and check the server response time result.
- Check only one page caching plugin is active in Plugins > Installed Plugins.
When to get help
Get help when two cache plugins clash, when logged-in users or carts see stale pages, or when the site is still slow with caching on. WordPress speed optimisation covers this kind of work, with a written scope before anything starts. You can also send the details through the contact form.
Related fixes: the PCLZIP_ERR_BAD_FORMAT error and WordPress menu not showing.
FAQs
Do I need a caching plugin if my host already caches?
Often not for page caching. Use the host's cache, and on LiteSpeed hosting use the LiteSpeed Cache plugin, which works with it. Check your host's documentation before adding another caching plugin.
Which WordPress caching plugin is best?
It depends on your server. On LiteSpeed, LiteSpeed Cache is the natural fit; elsewhere, WP Rocket, W3 Total Cache and WP Super Cache are common choices. A well-configured single plugin matters more than which one you pick.
Is Redis object caching worth it?
For WooCommerce stores, membership sites and sites with many logged-in users it often helps, because those pages can't be fully page-cached. For a small brochure site with good page caching, the difference is usually small.
Why can't I see my changes after updating a page?
A cached copy is still being served somewhere. Purge the plugin, server and CDN caches, then hard refresh or check in a private window.
Does caching help SEO?
Indirectly. Faster server responses help page experience and make it easier for Google to crawl your site, but caching won't make up for weak content.
What is server-side caching in WordPress?
It is caching handled by the web server or host rather than only by a plugin. Servers such as LiteSpeed, Nginx or Varnish serve a saved copy of the page before WordPress loads, which is usually the fastest option. A companion plugin may control it from the dashboard.
Need help with your website?
I'm 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, usually within 24 hours.


