How to Clear Cache in WordPress (Every Layer, Step by Step)
You changed a page and the old version still shows. Somewhere between your server and the screen, a cache is serving a saved copy, and a WordPress site can have several of them. Here is how to tell which one, and clear it without slowing the site down.
In this article
Key takeaways
- Several caches can serve an old copy of a page: your browser, a CDN, the host, a cache plugin and the object cache.
- Check in a private window first: if the change shows there, only your own browser cache is stale.
- Clear from the server outwards: cache plugin and host page cache first, then the CDN, then your browser.
- WP Rocket: Clear and preload cache. LiteSpeed Cache: Toolbox → Purge → Purge All.
- On managed hosting, use the host's own button; WP Engine's wp-admin button skips the object cache.
- On a CDN, purge single URLs when you can; a full purge sends every request back to your server.
The short answer
Find the layer that’s serving the old copy, and clear that one, starting from the server.
- Open the page in a private window. If the change shows there, clear your browser cache and you’re done.
- Clear your cache plugin. In WP Rocket, Clear and preload cache; in LiteSpeed Cache, Purge All.
- Clear your host’s cache if it has one. WP Engine and SiteGround, for example, have their own buttons.
- Purge the CDN, ideally only the URLs that changed.
- Flush the object cache if menus, widgets or settings still look old.
Which cache is showing the old page?
Each layer keeps its own copy, and each is cleared in its own place:
| Layer | What it keeps | Where to clear it |
|---|---|---|
| Your browser | Images, CSS and scripts on your own device | A private window, or a hard reload |
| CDN, such as Cloudflare | Copies of files, and on some setups whole pages, close to visitors | The CDN’s dashboard: purge by URL or everything |
| Host page cache | Whole pages on the server; WP Engine uses Varnish | The host’s dashboard or its wp-admin button |
| Cache plugin | Whole pages as files, often minified CSS and JS too | The plugin’s clear or purge button |
| Object cache | Database results and settings, in Redis or Memcached | wp cache flush or the host’s object cache button |
WordPress itself only loads these when they’re set up: a page cache plugin works through a wp-content/advanced-cache.php file that WordPress loads when WP_CACHE is true, and a persistent object cache through wp-content/object-cache.php. Since WordPress 6.1, Tools → Site Health tells you whether a page cache was detected and recommends a persistent object cache for busy sites. WordPress’s caching handbook explains each layer in more depth.
1. Rule out your own browser
Before clearing anything on the server, open the page in a private or incognito window. A private window starts without your saved files, so it shows what a new visitor gets.
- The change shows in the private window: only your browser has an old copy. Reload the page with Ctrl + Shift + R (Cmd + Shift + R on a Mac) or clear your browser’s cache.
- The private window shows the old page too: the copy is on the server or the CDN. Carry on with step 2.
- Logged-in users often see fresh pages anyway, because most page caches skip them. So check while logged out, which is how visitors see the site.
2. Clear your cache plugin
Most cache plugins put a clear or purge command on their settings page and in the toolbar at the top of wp-admin. Where to find it in the most used ones (installs from WordPress.org on 13 November 2026, all tested with WordPress 7.1.4):
| Plugin | Active installs | Where to clear |
|---|---|---|
| LiteSpeed Cache | 7,000,000+ | LiteSpeed Cache → Toolbox → Purge → Purge All, or its admin bar menu |
| WP Rocket (paid) | not on WordPress.org | Settings → WP Rocket → Dashboard → Clear and preload cache, or its admin bar menu |
| WP Super Cache | 1,000,000+ | Its settings page, under Settings |
| WP Fastest Cache | 1,000,000+ | Its settings page |
| Speed Optimizer | 1,000,000+ | SiteGround’s plugin: manual cache purge |
| WP-Optimize | 1,000,000+ | Its cache settings; you can choose which roles may purge |
| W3 Total Cache | 900,000+ | Its Empty all caches command |
- WP Rocket, from its documentation: the button reads Clear cache when Preload is off. To clear a single post, use the Clear cache button in its Publish box.
- LiteSpeed Cache‘s Toolbox lists separate purges for the page cache, CSS and JS, the PHP opcode cache and more; Purge All does them together.
- Optimisation plugins keep their own files. Autoptimize, for example, combines CSS and JavaScript, and its readme points to the Delete Cache link in its toolbar menu or Save changes & clear cache on its settings page. Clear these when a style change doesn’t show.
3. Clear your host's cache
Managed WordPress hosts usually run their own page cache in front of WordPress, and a plugin’s button doesn’t always reach it. Use the host’s own controls:
- WP Engine, from its support guide: in the User Portal, open the site, then Cache, and choose Clear all caches, or just the page, network (CDN) or object cache. WP Engine calls this the recommended method. In wp-admin, WP Engine → Caching → Clear All Caches clears the page and network caches but not the object cache.
- SiteGround clears its cache through its Speed Optimizer plugin, which can purge automatically after changes or on demand.
- Other hosts have a cache button in their dashboard or their own plugin; their help pages name it.
WP Engine notes that after clearing all caches “your website will be slower for a period of time until the pages become newly cached”. So batch your edits and clear once at the end, rather than after every change.
4. Purge the CDN
If your site runs behind a CDN, the CDN keeps its own copies around the world. Some hosts include one: WP Engine’s “Clear all caches” covers its Cloudflare-powered network cache. If you manage Cloudflare yourself:
- In the Cloudflare dashboard, open the caching Configuration page.
- Under Purge Cache, purge the URLs that changed, or choose Purge Everything.
Cloudflare’s documentation “strongly recommends using single-file (by URL) purging instead of a complete cache purge”: after a full purge every request goes back to your server until the cache refills, which can slow a busy site down.
5. Flush the object cache
A persistent object cache, such as Redis through the Redis Object Cache plugin (500,000+ active installs), keeps database results and settings between page loads. When a menu, widget or setting stays old after the page caches are clear, this is the layer to empty:
# Flush the object cache
wp cache flush
# Delete expired transients (cached values with an expiry date)
wp transient delete --expiredWP-CLI’s documentation notes that on Multisite with a persistent object cache, flushing usually empties it for every site in the network. Without WP-CLI, use your host’s object cache button or the object cache plugin’s settings page.
When clearing the cache doesn't help
- Check the change was saved. A draft, an unsaved edit or a change made on another copy of the page looks exactly like a cache problem.
- Check you’re editing the right place. Headers and footers often come from the theme or a template, not the page. Our guide to editing HTML in WordPress shows where each part lives.
- Old pages in Google aren’t a cache you control. Google picks up the new version when it crawls the page again; you can ask it to with URL inspection in Search Console.
- Scheduled posts stuck? A page cache that answers almost every visit can starve WordPress’s scheduler of page loads. Our guide to missed schedule errors explains the fix.
Caching is also the biggest single speed win on most WordPress sites; our guide to speeding up WordPress covers setting it up well.
Where WPOS fits
WPOS works inside wp-admin, so it sees the same caches you do. When the agent changes a page, it checks its own render with a browser screenshot before it reports the change as done, which is where a stale cache usually shows up. One request covers the routine:
“Update the opening hours on the contact page, clear every cache you can reach, then show me the page on phone and desktop in a fresh browser.”
WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.
Frequently Asked Questions
Use your cache plugin's clear or purge button (WP Rocket: Clear and preload cache; LiteSpeed Cache: Purge All), then your host's cache if it has one, then the CDN, and check in a private browser window. If menus or settings still look old, flush the object cache too, for example with wp cache flush.
A cache is still serving the old copy. Open the page in a private window: if the change shows there, only your own browser cache is stale. If it doesn't, clear the plugin, host and CDN caches in that order, and make sure the change was saved and published.
No content or settings. It only removes stored copies, so the next visits are built fresh. The site is a little slower for a short while until the cache fills up again.
Only when a change doesn't show up. A full purge empties every cached page at once, so the next visitors wait for pages to be rebuilt. Batch your edits and clear once at the end.
The page cache stores whole finished pages, so they can be sent without running WordPress. The object cache stores database results and settings, so WordPress itself runs faster. Clear the page cache for content changes and the object cache when settings or menus look stuck.
In the Cloudflare dashboard, open the caching Configuration page and use Purge Cache. Cloudflare recommends purging single URLs rather than Purge Everything, because after a full purge every request goes back to your server until the cache refills.
Start free with 15,000 credits.
Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.
See the change, not the cache.
WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.