Your WordPress website isn’t performing at the level you want it to. You’re trying to figure out the best troubleshooting steps to try, and one piece of advice you’ve come across is to clear the cache on your WordPress site.
If you’re not familiar with what caching is or how clearing the cache on your WordPress site works, you’re probably hoping for some answers. Here’s the rundown on how and why to clear your WordPress cache.
How Does WordPress Caching Work?
Site speed plays a huge role in website performance. Not only is it crucial for the user experience—nobody wants to spend time waiting for a website to load, and most users won’t wait long before they bounce—but it also affects search engine optimization (SEO).
Each time a user visits your website, your server must load all of the various files that make up the web page they’ve visited. That includes CSS, image files, text, videos, all of it. The more you have on the page, the longer it can take to load.
But if you have WordPress caching set up, after loading your web page once, your server will remember what it looked like the next time someone visits. Instead of having to load each file all over again separately, it can more quickly load the webpage as a whole.
Why Clear the Cache on your WordPress Site?
That sounds like a good thing. Faster loading times mean happier visitors and better site performance, right? So why would you want to clear the cache and wipe the server’s memory of the page out?
When you make an update to your website, you want people to see the changes. If the cache is serving up an outdated version of a webpage, then your visitors aren’t benefiting from the current or improved information you’ve added. Or if you made changes to improve your website’s performance, such as replacing your images with compressed versions, visitors seeing the cached version won’t get the benefit of those updates.
In addition, when WordPress releases updates, or when your WordPress plugins do, it’s often to improve security and performance of your website. Clearing your cache ensures that those changes take effect, improving your website security.
A lot of the time, caching mechanisms recognize updates to your website automatically. Clearing your cache manually isn’t something you need to do all the time. But if you’ve made an important change to your website you want to make sure your visitors will see, clearing your WordPress cache can ensure they see the new version faster. And any time your website isn’t functioning properly, clearing the cache is often a good early step for troubleshooting the problem,
How to Clear your WordPress Cache
There’s not one WordPress cache to clear. Based on the particular apps and plugins you use, clearing your cache can mean a number of different things.
1. Clear your web browser cache.
Before you move on to any of the other steps on this list, the best place to start is with your individual browser. Oftentimes, when you see outdated information on your website, the culprit is your browser cache, and this is a simple step to try before moving on to the others.
Keep in mind, clearing your browser cache won’t make any difference in terms of what other visitors will see on your website. The results of this step are specific to your machine and browser.
The steps to do this vary based on which browser you’re using. Here’s what to do for each of the main three:
Chrome
Click on the three dots in the top right corner of the browser. Select More Tools from the dropdown menu, then Clear Browsing Data.
Firefox
Click on the hamburger menu in the top right, then choose Preferences.
Select Privacy and Security on the right side of the screen, then scroll down to find the Cookies and Site Data section. Click Clear Data.
Make sure the box next to Cached Web Content is checked (you can remove the one next to Cookies and Site Data, if you don’t want to deal with having to re-log into your various accounts). Click Clear.
Safari
Choose Preferences from the main Safari menu.
Select Privacy from the Preferences menu, then click Manage Website Data and Remove All.
2. Clear the cache for your WordPress plugins.
Many WordPress plugins create a cache to improve your website performance.
In many cases, you can easily clear the cache for these by looking for a link or button on the Settings page that says something like Clear Cache or Delete Cache. For example, in the Google Analyticator plugin, it looks like this:
WordPress firewall plugins are another common category that create caches. If you use Sitelock to provide a firewall for your WordPress site, you can rest assured that it automatically clears your cache once a day. If you need to clear it sooner than that, you can call Sitelock to ask them to do it manually at 877-749-1419.
If you use the Sucuri plugin for your firewall, choose Firewall in the Sucuri menu within WordPress, then click Clear Cache.
3. Clear your WordPress cache using a WordPress caching plugin.
Any WordPress caching plugin you use should provide an easy way to clear your cache. For the two most popular options:
WP Super Cache
WP Super Cache has a Delete Cache button in the Settings page.
In addition, under the Advanced tab, you can select the option to automatically clear the cache each time a page is published or updated.
W3 Total Cache
In W3 Total Cache, choose Performance in the menu, then Dashboard.
There you’ll see an Empty All Caches button.
4. Clear your server cache with managed WordPress hosting.
If you’d like to clear your server cache, the instructions will vary depending on which web hosting provider you use. Check the support documents provided by your web hosting company. If you don’t find step-by-step instructions on how to clear your server cache manually, contact the company’s support team directly for help.
HostGator customers can contact support 24/7 for help with this and any other requests you have.
5. Clear your content delivery network (CDN) cache.
If you use a CDN in order to speed up your website’s performance globally, that’s another place you can try clearing your cache. As with many of the other categories on this list, the specific instructions for clearing your cache will depend on which CDN you use.
In Cloudflare, one of the most popular CDN options, you can clear your cache in the Caching app within the product. If you use another CDN, check with the company directly to learn the best instructions to follow.
Keep Your WordPress Website Working Right
Enabling caching on an ongoing basis in these different apps and places is a good way to keep the performance of your WordPress website up to the standards your visitors expect and deserve. But knowing how to clear the various caches in the different services and apps you use is a useful tip for any time you need to do some troubleshooting with your WordPress website.
Kristen Hicks is an Austin-based freelance content writer and lifelong learner with an ongoing curiosity to learn new things. She uses that curiosity, combined with her experience as a freelance business owner, to write about subjects valuable to small business owners on the HostGator blog. You can find her on Twitter at @atxcopywriter.