View Categories

How to clear WordPress cache

Caching is a complex and interesting process, but to save some time, we will forgo deep details or complex workflows and KISS.

THE CACHE

noun: cache; plural noun: caches – a collection of items of the same type stored in a hidden or inaccessible place.

verb: cache; 3rd person present: caches; past tense: cached; past participle: cached; gerund or present participle: cacheing; gerund or present participle: caching – store away in hiding or for future use.

In our case, cached data is the information from a website or app that is stored on your device/plugin/hosting/CDN/etc. to speed up browsing.

Why clear the cache?

Security/privacy – if your computer is also used by another person, they can see your activities on the internet.

Troubleshooting – sometimes the cache can cause problems because something has changed, but the browser/plugin/CDN is not up to date and loads the old information. This can cause the page to load slowly, return errors, not respond properly, etc.

In what order?

The correct order for clearing your cache is determined by the information workflow.

  1. CSS/JS optimization components (ShortPixel Adaptive Images, Autoptimize, Asset CleanUp, your theme…).
  2. Cache plugins (WP Rocket, Cache Enabler, Swift Performance, W3 Total Cache…).
  3. Hosting/Server (SiteGround, Kinsta, WP Engine, Varnish…).
  4. CDN (Cloudflare, StackPath…).
  5. Browser (Chrome, Edge, Firefox…).

1. CSS/JS

ShortPixel Adaptive Images

Go to Settings → ShortPixel AI and press the button “Clear CSS cache“.

Autoptimize

On your WordPress Toolbar, hover over  Autoptimize and click on Delete Cache:

2. Cache plugins

SiteGround Optimizer

On your WordPress Toolbar, click on  Purge SG Cache:

WP Rocket

a. Clear cache on the whole site

Go to Settings → WP Rocket → Dashboard tab and press the Clear cache button.

Another way is via the WordPress Toolbar. Hover over the WP Rocket menu link and you will see a dropdown menu. Click on the  Clear cache link.

b. Clear cache on specific post/page

There are two ways to clear the cache for specific posts/pages.

Visit the Pages or Posts section in WordPress and hover over the table row of a page or post to see the Clear this cache link.

Another way to do this is on the Edit screen of a post or page. The Clear cache button can be found in the Publish meta box.

Cache Enabler

You can clear the cache manually via the WordPress Toolbar (1) or via the Save Changes button (2) on the Cache Enabler settings page.

3. Hosting

SiteGround

Click the Purge SG Cache button on the WordPress Toolbar. If you can’t see the button, you need to install the plugin SG Optimizer. You should also contact SiteGround support to make sure you actually have the caching layers enabled.

Alternatively, you can log into your SiteGround control panel and clear the server cache from there: https://www.siteground.com/kb/clear-site-cache/

WP Engine

  1. Log into the WordPress admin dashboard.
  2. Click on the WP Engine menu.
  3. Go to the Caching tab.
  4. Click Clear all caches.

Bluehost

On your WordPress Toolbar, hover over Caching and then select Purge All.

4. CDN

Flush an image / all images from ShortPixel’s CDN

If you are using ShortPixel Adaptive Image or Autoptimize (with the option to optimize images with ShortPixel) and need to flush one of the images cached in the CDN, you can simply follow these instructions: How to flush an image/all images from ShortPixel CDN?

If you are using ShortPixel Adaptive Image and need to flush all the images from the cache of our CDN, you can also follow these instructions: How to flush an image/all images from ShortPixel CDN?

If you are using Autoptimize (with the option to optimize images with ShortPixel) and need to flush all images from the cache of our CDN, you can also follow these instructions: How to flush CDN cache for Autoptimize.

Flush CDN cache for Cloudflare

Information taken from Purging cached resources from Cloudflare

Purging by single-file through your Cloudflare dashboard

  1. Log into Cloudflare and select the site with the resources to purge.
  2. Click the Caching app.
  3. In the Purge Cache pane, click Custom Purge.The  Custom Purge dialog box appears.
  4. Select URL in the Purge by field.
  5. Enter the appropriate value(s) in the text box, using the format type shown in the example.
  6. Perform any additional instructions to complete the form.
  7. Review your entries.
  8. Click Purge

Purge everything through your Cloudflare dashboard

Reminder: It is highly recommended to perform single-file purges for technical reasons.

  1. Login to Cloudflare and select the site with the resources to purge.
  2. Click the Caching app.
  3. In the Purge Cache pane, click Purge Everything.A warning dialog appears.
  4. If you agree, click Purge Everything.

5. Browsers

Google Chrome

Chrome – Windows

    1. On your computer, open Chrome.
    2. Click the button with the 3 dots in the top right corner.
    3. Click More toolsClear browsing data.
    4. Select a Time range at the top. To delete everything, select All time.
    5. Check the box next to Cached images and files.
    6. Click on Clear data.

For more information, please visit the following page: Clear cache & cookies

Chrome – Android

  1. On your Android phone or tablet, open the Chrome app.
  2. Tap the button with the 3 dots in the top right corner.
  3. Tap on History → Clear browsing data.
  4. Select a Time range at the top. To delete everything, select All time.
  5. Check the box next Cached images and files.
  6. Tap Clear data.

For more information, please visit the following page: Clear cache & cookies

Chrome – iPhone/iPad

If you clear your cache or cookies, your browser may log you out of your Google Account. To make sure you can log back in, update your recovery phone number and email address.

  1. On your iPhone or iPad, open the Chrome app.
  2. Tap the button with 3 dots at the bottom.
  3. Tap History → Clear browsing data.
  4. Make sure there is a check mark next to Cached Images and Files.
  5. Tap Clear browsing data.

For more information, please visit the following page: Clear cache & cookies

Mozilla Firefox – Windows

    1. Click the Menu button and select Options
    2. Select the Privacy & Security panel.
    3. On the Cookies and Site Data section, click on Clear Data

  1. Remove the check mark in front of Cookies and Site Data.
  2. With the Cached Web Content check marked, click the Clear button.
  3. Close the about:preferences page. Any changes you’ve made will automatically be saved.

For more information, please visit How to clear the Firefox cache | Firefox Help

Microsoft Edge – Windows

    1. Open Microsoft Edge and then select Settings  Privacy, search, and services


  1. Under Clear browsing data, select Choose what to clear.
  2. Under Time range, choose a time range.
  3. Select Cached images and files, and then select Clear now.

For more information, please visit View and delete browser history in Microsoft Edge

Opera – Windows

Press Ctrl+Shift+Del to open your Clear browsing data options. Make sure Cached images and files is selected and then click on Clear data.

For more information, please visit How to clear cache, cookies and other history data in browser | Opera

Safari – macOS

You can clear the cache through the developer menu.

  1. Select the first item Safari in the main menu and from the drop-down the item Preferences…
  2. A popup opens. Click on the tab Advanced.
  3. Check the option Show Develop menu in menu bar at the bottom. Now you should see a new menu item in the main menu named Develop.
  4. If you click on the menu item Develop you can select Empty Caches from the submenu items.
  5. Reload the site.

Internet Explorer – Windows

  1. Close all Internet Explorer windows.
  2. Open a new Internet Explorer window, and then click on Tools  Internet Options (if you don’t see this, press the Alt key to show the menu bar).
  3. In the General tab, under Browsing History section, click Delete.
  4. In the Delete Browsing History window, select the check box for Temporary Internet Files and website files.
  5. Click on Delete.