All posts
Blog

How to Clear Cache in WordPress: Every Layer, Step by Step

By Dakshesh13 min read

  • wordpress
  • wordpress maintenance
  • wordpress plugins
  • website monitoring
Continue with GoogleFree plan · No credit card required

Listen to this article

14 minute listen

Narrated by an AI voice · 16 chapters

0:00-13:30

AI Overview

To clear cache in WordPress, purge your caching plugin from the admin bar, clear your host's server cache, purge your CDN such as Cloudflare, then hard refresh your browser. If you use Elementor or Redis, regenerate the builder's CSS files and flush the object cache too, working from the inside out.

Key takeaways

  • Most WordPress sites have several cache layers, and each must be cleared separately.
  • Clear from the inside out: builder CSS, object cache, plugin, host, CDN, browser.
  • Logged-in admins often bypass the cache, so check changes in a private window.
  • wp cache flush clears only the object cache, not plugin, host or CDN page caches.
  • Clearing cache never deletes content, but constant full purges slow your site down.

Free WordPress plugin

Know which plugin update broke your site.

The free MyKavo plugin watches your site through every plugin, theme and core update, and tells you which one caused a change, before your visitors find it.

  • Records every plugin, theme and WordPress update
  • Checks your key pages right after each update and names the one that broke something
  • One-click rollback when an update goes wrong, free
  • Changes, alerts and before-and-after proof inside wp-admin

Free on WordPress.org · WordPress 6.2+ · PHP 7.4+ · The check after each update comes with every paid plan

Summarize with AI

Opens the assistant in a new tab with a link to this post.

On this page

You made a change in WordPress, hit Update, and the live site still shows the old version. That almost always means a cache somewhere is serving a saved copy of the page. The catch is that a typical WordPress site has several caches stacked on top of each other, and clearing one doesn't clear the others.

This guide shows you how to clear cache in WordPress at every layer: your browser, caching plugins like WP Rocket and LiteSpeed Cache, your host's server cache, Cloudflare, Redis object cache, Elementor's CSS files and WP-CLI. It also covers what to check when changes still aren't showing after you've purged everything.

Cleared the cache and now something looks off? The free MyKavo WordPress plugin checks your pages after every update and shows before-and-after screenshots of exactly what changed. Start monitoring free.

Quick answer: how to clear cache in WordPress#

  1. Regenerate page builder CSS if you use one (Elementor > Tools > Regenerate Files & Data).
  2. Purge your caching plugin from the WordPress admin bar (for example "Clear and preload cache" in WP Rocket or "Purge All" in LiteSpeed Cache).
  3. Clear your host's server cache from the host's plugin, admin bar button or hosting dashboard.
  4. Purge your CDN, such as Cloudflare's "Purge Everything" under Caching > Configuration.
  5. Flush the object cache if you use Redis or Memcached, or run wp cache flush with WP-CLI.
  6. Hard refresh your browser (Ctrl+Shift+R on Windows, Cmd+Shift+R on Mac) or check in a private window.

Work from the inside out, in this order, so each layer rebuilds from fresh content.

The cache layers on a WordPress site#

Each layer stores a copy of something to make your site faster. Each can also show you stale content.

LayerWhat it storesWho controls itHow to clear
Browser cacheCSS, JS, images, sometimes pagesEach visitor's browserHard refresh or private window
CDN cacheStatic files, often full pagesCloudflare or another CDNPurge in the CDN dashboard
Server or host cacheFull HTML pages (Varnish, Nginx, LiteSpeed)Your hostHost plugin, admin bar or dashboard
Caching pluginFull HTML pages, minified CSS/JSWP Rocket, W3 Total Cache, etc.Plugin's purge button
Object cacheDatabase query resultsRedis or MemcachedFlush in plugin or wp cache flush
Page builder filesGenerated CSS for each pageElementor and other buildersRegenerate in builder settings
PHP OPcacheCompiled PHP codeYour host's PHP setupHost dashboard or PHP restart

You rarely need to clear all of them. If you changed text in a post, the page cache and CDN are usually the culprits. If you changed styling in Elementor, start with its CSS files. If you edited PHP files directly, OPcache may be involved.

Before you clear anything#

Clearing cache is safe: it doesn't delete content, settings or images. It only throws away saved copies so they get rebuilt.

Two things to know first:

  • Your site may feel slower for a few minutes while caches refill. On busy sites, clear during quieter hours or use a "clear and preload" option where available.
  • Make sure you're looking at the right site. Changes made on a staging site won't appear on production until you push them.

Step 1: Clear your browser cache#

Start here because it's instant and rules out the simplest cause.

  • Hard refresh: Ctrl+Shift+R (Windows and Linux) or Cmd+Shift+R (Mac) in Chrome, Edge and Firefox. In Safari, hold Shift and click the reload button.
  • Private or incognito window: opens the page without your existing cache or login cookies. This is also how logged-out visitors see your site.
  • Full clear: in your browser's settings, clear "Cached images and files" for the time range you need.

Logged-in users often bypass page caches. Many caching plugins don't serve cached pages to logged-in admins, so you might see your change while visitors don't. Always check in a private window.

Step 2: Clear your caching plugin#

Most caching plugins add a purge button to the WordPress admin bar at the top of the screen. Here's where to find it in the popular ones:

PluginWhere to clear the cache
WP RocketAdmin bar: WP Rocket > Clear and preload cache. Or Settings > WP Rocket > Dashboard.
LiteSpeed CacheAdmin bar: the LiteSpeed icon > Purge All.
W3 Total CacheAdmin bar: Performance > Purge All Caches.
WP Super CacheAdmin bar: Delete Cache. Or Settings > WP Super Cache > Delete Cache.
WP Fastest CacheIts menu in the admin bar or its settings page in wp-admin, using the option to delete or clear all cache.

Menu labels change between versions, so if your screen looks slightly different, look for "Purge," "Clear" or "Delete" cache in the plugin's admin bar menu.

Clear only one page#

Most of these plugins also let you purge a single URL, either from the admin bar while viewing that page or from a link in the posts list. Purging one page is faster and lighter than clearing the whole site when you've edited one post.

Clear minified CSS and JavaScript#

Optimization features (minify, combine, remove unused CSS, delay JS) create their own generated files. If a styling or script change isn't showing, look for a separate option to clear optimized CSS or JS files in your plugin. These files are a common cause of layout problems after a theme or plugin update.

Try it on your site · free

Check your own page's meta tags

Title, description, canonical and robots - including an accidental noindex - in a few seconds.

Open the full tool

Step 3: Clear your host's server cache#

Managed WordPress hosts usually run a server-level cache in front of WordPress, separate from any caching plugin. If you clear your plugin but the old page persists, this is the next suspect.

  • SiteGround: uses its Speed Optimizer plugin, which adds a "Purge SG Cache" button to the admin bar. You can also flush the cache from Site Tools.
  • WP Engine: use the WP Engine menu in wp-admin, open Caching and choose to clear all caches. Caches can also be cleared from the WP Engine user portal.
  • Kinsta: clear the cache from the site's Tools or Caching area in MyKinsta, or from the "Clear Caches" option Kinsta adds to the admin bar.
  • Cloudways: use the Breeze plugin's purge option, and clear Varnish from the application's settings in the Cloudways platform if it's enabled.

Other hosts (Bluehost, Hostinger, GoDaddy and many more) have similar buttons in their own plugins or dashboards. Search your host's help center for "clear cache" if you're not sure; only your host can tell you exactly what's cached on their servers.

Step 4: Purge your CDN (Cloudflare)#

If your site uses Cloudflare or another CDN, copies of your files are stored on servers around the world. Purging your WordPress cache doesn't touch them.

To purge Cloudflare:

  1. Log in to the Cloudflare dashboard and select your domain.
  2. Go to Caching > Configuration.
  3. Click Purge Everything to clear all files, or Custom Purge to clear specific URLs.

The official Cloudflare WordPress plugin can also purge the cache from wp-admin, and some caching plugins connect to Cloudflare and purge it automatically when you clear their cache.

Development Mode in Cloudflare bypasses the cache temporarily (it switches itself off after three hours), which is useful while you're actively editing CSS.

Step 5: Flush the object cache (Redis or Memcached)#

A persistent object cache stores database query results in memory. It speeds up wp-admin and dynamic pages, but stale entries can show old settings, menus or widget content.

  • Redis Object Cache plugin: go to Settings > Redis and click Flush Cache.
  • Host-managed Redis: many hosts provide a flush button in the dashboard or their own plugin.
  • WP-CLI: run wp cache flush (see below).

If you don't use a persistent object cache, WordPress's built-in object cache only lasts for a single page load, so there's nothing to clear.

Step 6: Regenerate Elementor and page builder CSS#

Page builders save the styles for each page into generated CSS files. If you change a global color, font or template and the front end doesn't update, those files are stale.

In Elementor: go to Elementor > Tools, find Regenerate Files & Data, and click Regenerate Files. Then clear your caching plugin and CDN, because they may still hold the old CSS file.

Other builders, including Divi and Beaver Builder, have similar options to clear or regenerate their static CSS in their settings. If Elementor still misbehaves after this, our guide on Elementor not working covers the next steps.

Clear WordPress cache with WP-CLI#

If you have SSH access, WP-CLI clears caches quickly and is easy to script after deployments:

# Flush the object cache (Redis, Memcached or the default cache)
wp cache flush

# Delete all transients stored in the database
wp transient delete --all

# Regenerate rewrite rules (fixes some 404s after permalink changes)
wp rewrite flush

wp cache flush clears the object cache only. It does not clear page caches from plugins, your host or Cloudflare. Many caching plugins add their own WP-CLI commands for that, so check your plugin's documentation.

On multisite, add --url= to target a specific site, and note that flushing a shared object cache affects the whole network.

WordPress changes not showing after clearing the cache?#

If you've cleared every layer and the old version is still there, the problem may not be cache at all.

What you seeLikely causeWhat to do
Change shows for you, not visitorsLogged-in users bypass cache; CDN or host cache still staleCheck in a private window, purge CDN and host cache
CSS change ignoredStale minified CSS, builder CSS, or a more specific CSS rule elsewhereRegenerate CSS files; inspect the element in browser dev tools
PHP file edit has no effectPHP OPcache, wrong file, or edited the parent theme instead of the child themeAsk your host to reset OPcache; confirm which theme is active
Change visible on staging onlyNot deployed to productionPush or repeat the change on the live site
Page shows mixed old and new contentDifferent layers rebuilt at different timesClear in order: builder, object, plugin, host, CDN, browser
Layout broke after clearingOptimization settings generated broken CSS/JSDisable minify/combine options one at a time; see WordPress plugin conflict

Also confirm the change was actually saved. Post revisions show the last saved version, and the block editor shows whether a post is published or still a draft.

When to clear cache (and when not to)#

Clear cache after:

  • Updating WordPress core, a theme or a plugin (see our guide on how to update WordPress).
  • Changing global styles, menus, widgets or templates.
  • Switching from HTTP to HTTPS or fixing mixed content.
  • Changing caching or optimization settings.

Don't clear it constantly. A full purge on every small edit makes the cache useless and slows your site down for real visitors. Most caching plugins already purge a post automatically when you update it. A well-tuned cache is one of the biggest wins for speed and Core Web Vitals; our guide to speeding up WordPress covers the setup.

How to catch cache problems automatically#

Cache problems are awkward because you often see a different site than your visitors do. You're logged in, your browser has fresh files, and everything looks fine, while visitors get a stale page or a layout broken by a bad minified CSS file.

MyKavo checks your pages the way a logged-out visitor sees them. You pick the pages that matter, MyKavo saves an approved baseline, then re-scans on a schedule (weekly on the Free plan, daily on paid plans) and alerts you with before-and-after screenshots when the page changes visually, a script is added or removed, or page weight and request count jump. The free MyKavo WordPress plugin runs those checks after every plugin, theme and core update and names the update when something broke. If you just want a one-off comparison, try the free website change detector.

Frequently asked questions#

Frequently asked questions

How do I clear my WordPress cache?

Use your caching plugin's purge button in the admin bar, clear your host's server cache, purge your CDN such as Cloudflare, then hard refresh your browser. If you use Elementor or Redis, regenerate the CSS files and flush the object cache too.

Why are my WordPress changes not showing?

Usually a cache layer is still serving the old page: your browser, a caching plugin, your host's server cache or a CDN. Check in a private window, purge each layer in order, and confirm you edited the live site and not staging.

Does clearing cache delete anything in WordPress?

No. Clearing cache only removes saved copies of pages and files, which are rebuilt automatically. Your posts, pages, settings and media are not affected.

How do I clear cache in WordPress without a plugin?

Clear your host's cache from the hosting dashboard, purge your CDN, and hard refresh your browser. With SSH access you can run wp cache flush to clear the object cache, though it doesn't clear plugin or host page caches.

What does wp cache flush do?

It clears the WordPress object cache, such as Redis or Memcached entries. It does not clear page caches created by caching plugins, your host or Cloudflare, so you may still need to purge those separately.

How do I clear the Elementor cache?

Go to Elementor > Tools and click Regenerate Files under Regenerate Files & Data. Then clear your caching plugin and CDN so they stop serving the old CSS files.

How often should I clear my WordPress cache?

Only when you need to: after updates, design changes or settings changes that don't show up. Most caching plugins purge an individual page automatically when you update it, so constant full purges just slow your site down.

The bottom line#

When WordPress changes aren't showing, work through the cache layers from the inside out: page builder CSS, object cache, caching plugin, host cache, CDN, then your browser. Check the result in a private window, because that's what visitors see. If clearing everything doesn't help, the problem is usually the wrong site, the wrong theme file or an unsaved change.

See your site the way visitors do. Start monitoring your site free with MyKavo and add the free MyKavo WordPress plugin, no card needed.

Share this post

Write for MyKavo

Know website monitoring, WordPress or SEO from real work? Pitch us a guide. You keep a byline with one link to your site. Read the guidelines

Get alerted when your site breaks. Free, no card.

Start free