New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Caching

Learn how to clear WordPress cache completely.

You updated a plugin but the site still looks old. WordPress stacks multiple cache types on top of each other. Clearing only one layer leaves stale HTML, CSS, or database objects. This tutorial purges everything safely on a live site.

Time: 15-25 minutes Level: Beginner
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

What this problem looks like

Page cache stores HTML files. Object cache stores database query results. Opcode cache stores compiled PHP. CDN cache stores static assets at the edge. Each needs a separate purge command.

Clearing cache does not fix underlying bugs, but it stops false negatives when you test fixes. Always purge after plugin updates, CSS changes, or menu edits.

Step 1: Purge page cache plugins

WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, and SiteGround Optimizer each expose a Purge or Clear cache button. Use Clear all, not only homepage. Some plugins add an admin bar link labelled Purge SG Cache or Delete cache.

  1. Log into wp-admin.
  2. Open your cache plugin settings.
  3. Click purge all or clear cache and minified CSS.
  4. Confirm success notice appears.

Step 2: Flush object cache and Redis

If Redis or Memcached is active, flushing only page cache leaves stale options and transients. Use hosting panel flush object cache or WP-CLI when available.

The commands below need SSH access and will not work inside File Manager:

bash
wp cache flush
wp transient delete --all

Step 3: Purge hosting and CDN layers

Cloudflare: Caching → Configuration → Purge everything, or purge by URL for surgical tests. LiteSpeed servers cache outside WordPress. Use LiteSpeed Web Admin or host support to purge.

Do not purge CDN during a flash sale unless necessary. Full purges increase origin load temporarily.

Step 4: Reset opcode and PHP caches

OPcache stores compiled PHP. After deploying code via File Manager, SFTP, or FTP, changes may not appear until OPcache resets. Restart PHP-FPM from hosting or wait for TTL. Some hosts offer a Reset PHP cache button.

Step 5: Verify cache is actually cleared

Open the site in a private window. In DevTools Network tab, enable Disable cache, reload, and check response headers. Look for cache HIT from CDN or age headers that should reset after purge.

When to stop DIY and hire help

If purging cache does not reflect code changes, you may have multiple unknown cache layers or a misconfigured CDN. BugShield audits cache stacks on WordPress and WooCommerce sites at a confirmed price without hourly billing surprises.

Questions answered

Clearing WordPress cache FAQs

Answers about page, object, server, CDN, browser, and PHP caches, plus checking that visitors receive current content.

How often should I clear WordPress cache?

Clear after deployments, design changes, or plugin updates. Routine daily purges are unnecessary if exclusions are correct.

Will clearing cache slow my site temporarily?

First visits after purge rebuild cache files and may feel slower until pages are cached again. Plan purges outside peak traffic when possible.

Does clear cache delete my content?

No. Cache stores generated copies. Posts, products, and settings in the database stay intact.

Why do I still see old CSS after purge?

Minified CSS may live in a separate folder, browser cache, or CDN edge. Purge minified files in the plugin and hard refresh with Ctrl+Shift+R.

Which cache layers can a WordPress site use?

A site may use plugin page cache, server cache, object cache, PHP opcode cache, CDN cache, and browser cache at the same time.

Should I clear WordPress cache for logged-out visitors?

Yes. Public page caches often affect logged-out visitors most. Test in a private window after purging the plugin, server, and CDN layers.

What is the difference between page cache and object cache?

Page cache stores complete responses, while object cache stores database results and WordPress objects. Clearing one does not necessarily clear the other.

How do I clear a WordPress CDN cache?

Use the CDN dashboard or plugin integration, purge only the affected URLs when possible, then confirm the response headers no longer show a stale cached version.

Do I need to restart PHP to clear WordPress cache?

Usually not. Restart PHP only when opcode cache or a stuck PHP process is confirmed and you have safe hosting controls or support assistance.

How do I verify WordPress cache was cleared?

Reload in a private browser, inspect response headers and asset URLs, and compare the page while logged out, on mobile, and through the normal CDN hostname.

Would you rather a developer fixed it?

Request a fix at a confirmed price and speak directly with the BugShield developer working on your site.

Request a Fix