How to clear the various cache(s) WordPress

How to clear the various cache(s) WordPress

WordPress can have several caches but they are usually all accessible through your CMS area or perhaps your CDN (Content Delivery Service) service. In this article I’ll run through how to clear these just in case the changes you have made are not showing when you KNOW you have made a change that should be taking effect.

Website technology of all kinds (browser, server side cache, CDN caches for eg) utilize caching to make the website load as fast as possible. As such there can be several caches to clear if you aren’t seeing the changes that you made on your website that SHOULD be there.

Table of Contents

How to clear the Browser Cache

Depending on your browser then you will have different ways to do this. Below are instructions for the most popular laptop and mobile browsers – 2 from each.

NOTE: You’re browser stores files (like JS, CSS, Images etc) just in case you go back to that page. If you do it doesn’t need to load those again because they are more than likely the same. In this way a time saving can be made. But if you’ve made changes then the browser doesn’t always replace them straight away. You can clear the browser cache manually with the below instructions.

Laptop/Desktop Browsers:

Chrome:

  • Open up the page in question in your browser.
  • Right click on the screen someplace to show the menu.
  • Select ‘inspect element’.
  • Once you have right click on the ‘reload’ button on the top left of the browser window.
  • You will see a selection of reload options.
  • Select the, ‘Empty Cache and Hard Reload’ option and the cache will be cleared.
How to clear cache in Chrome Browser

Safari:

  • Go to the page in question in your Safari browser.
  • Go to the top menu called ‘Develop’, open it and then select the clear caches option.
  • Simple.
How to clear cache in Safari Browser

Mobile Browsers:

Chrome Mobile Browser:

  • On you mobile load up the page in question.
  • Go to the right hand top menu.
  • Select ‘History’
  • At the top you will see ‘Clear Browsing Cache‘. Click it.
  • You will have some options to choose from there in terms of what exactly to clear from the cache. I often just choose ‘Images and Files‘ as I don’t want to lose the passwords etc but you can do as you like.
Clearing the cache on a mobile chrome browser

Safari Mobile Browser:

  • Go to the page in question in your mobile Safari browser.
  • Click on the ‘book’ icon in the bottom right which is for bookmarks.
  • On the right hand side you will see a ‘clock’ icon which represents History. Click it.
  • On the bottom right you will see a ‘clear cache’ button.
Clearing the cache on a mobile Safari browser

How to clear any plugin related caches that minify or combine files to increase speed

In WordPress it’s also possible that you have a ‘cache plugin’ in your plugins list. These cache plugins can sometimes mean that the files in your site are combined and minified and various other things.

In order to clear the cache for any of these kinds of plugin go to the plugin list, or the left hand menu in the CMS or the top admin bar also in the CMS and look for option to ‘clear cache‘.

Each cache plugin will have a slightly different way of doin this so I can’t show you exactly but you should be able to find an option in one of the locations mentioned above.

NOTE: It’s also possible that these plugins remove a certain file from being loaded on the page so be sure to check its particular settings if you suspect the file you are editing isn’t even being loaded.

How to clear your CDN cache

You’d CDN will often do similar things like combine and minify files but it will also distribute these to servers all across the world. This can speed up a website for a user by lowering the physical distance with which the information actually needs to be sent from the server. We often forget that ultimately the internet is a physical network of wires (under the ocean sometimes) and physical computer’s that eventually end up at your wifi router.

Go to your CDN login page, login and find the specific website you are looking to clear the cache on. Then find the clear cache settings.

Each CDN is different so I cant give you specific steps to do this but at least you know that if you have a CDN then you have this avenue to check.

PROTIPS:

  • You can check if you are using a CDN by inspecting the code for your site and looking at the URL’s which fetch the CSS or JS files. If you are using a CDN then you can see the CDN in the URL for each file.
  • To access your CDN you may need to go into your server host account, or the CDN account itself or there may even be a plugin which controls this. If you are having difficulty finding where to get into the account then try these locations.

Still not working? Then try these

If the above hasn’t worked then here are some tips I’ve learned through experience.

Give it some time:

If the above options still aren’t working sometimes just waiting works. Between browsers and servers even the above options don’t work 100% of the time. 99% but sometimes not always.

One example of this is replacing a WooCommerce template from within your own child theme. Sometimes WooCommerce just needs 15 minutes before it figures out the change. I’m not sure of what sort of internal cache is happening there but some server file path probably takes time to update.

Ask your host server staff for help:

If you can’t find any of the above settings or accounts or you just don’t know where to go next you server host is often a paid account so you should have some sort of customer service option within there. Ask away.

The cache might not be the issue:

In some scenarios you have been editing a file which doesn’t actually load on the page even though you think it will or you haven’t saved the file where you made the change or updated the GIT repo. If all else fails one of these silly mistakes can sometimes be the case. Make a cup of tea and think if you’ve missed an obvious step.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *