Hosting Tutorial & Guide

How to Clear WordPress Cache Efficiently

updated on Apr 27, 2017
How to Clear WordPress Cache Efficiently Enabling caching is widely known as an effective way to improve the website performance. While the cached content can serve requests quickly with a static version of a website, your pages don't need to be rebuilt with the content sent from the server every time they are requested. This helps a lot in reducing the server load.

There could be different types of cache solutions used by a WordPress site, which include:
  • Browser cache – Modern web browsers usually store the website information in its memory so that you don't have to download the same data again and again from the server.
  • Server cache – To improve the server performance, some hosting providers use extra cache scripts.
  • CDN – CDN services create cached copies of the static content.
  • Cache plugins – Depending on the settings, these plugins serve the cached copies of different content on your website.
Cache can help if your WordPress site is slow. However, it sometimes causes problems also, making your changes not showing immediately or properly, which could mess up with the user experience. If you are meeting such troubles, then you should try clearing the cached data. In below, we will show how to do so. You can try the methods one by one until the problem is resolved.

Clear the Browser Cache

When you meet trouble displaying the newly updated content, firstly you can try clearing the cached data in your web browser which might not be able to recognize the change and reload the page automatically. You need to take different steps in order to clear the cache in different browsers.

For Chrome, you should find the settings icon on the upper right of the screen, click on it, find "More Tools", and select "Clear browsing data". Then you will get to the settings page with a popup asking you to choose which data to clear. Select the cached content, and click the "Clear browser data" button. You may need to wait for a few seconds for the request to be processed.

Clear Cache in Chrome

If you are using another web browser, be sure to follow the documentations. The steps won't be complicated to clear the cache.

When you are done, go back to your website to see whether changes can be loaded successfully. If everything is alright, just stop here. And in the case that the problem persists, move to the next solution.

Clear the Data of the Cache Plugin

A cache plugin is recommended by many experienced bloggers for the optimal WordPress setup. Such a plugin caches your website content and generates static HTML files, so that web browsers can be served by these files instead of downloading content from the server. Some security plugins also use cache.

The popular WordPress cache plugins allow you to clear cache easily from their settings. In below, we will take two cache plugins – WP Super Cache and W3 Total Cache – as examples.

WP Super Cache

In the case that you are using this plugin, go to Settings > WP Super Cache to access the plugin's settings. On the new page, you will easily find a part of "Delete Cached Pages". To clear the cached data, click on "Delete Cache".

Delete Cache in WP Super Cache

To prevent cache problems in the future, you can also open the "Advanced" tab, go to the advanced section, and enable automatic cache clear upon post publishing or update. By doing this, your posts will be reloaded from the server instead of being served from cache every time they are updated.

Advanced Settings

W3 Total Cache

This plugin also offers a simple way to clear the unneeded cache. By clicking on the "Performance" menu item upon the plugin installation, you will get into the dashboard where you will see a button of "empty all caches". Hitting the button will get rid of all the cached content.

Empty Cache in W3 Total Cache

Besides, the plugin provides many additional settings for the caches of page, object, database and browser. If you only want to clear the cache of a specific object, just find and unselect it, and then click the "Purge Caches" button. This will not affect any of the other cached content.

Clear Cache Individually

Clear the Server Cache

If clearing the browser cache and plugin cache cannot solve your problem, then the source of trouble is probably the server cache used by your hosting provider. Many hosting providers enable server-side caching for HTML, PHP, database and objects without telling their customers clearly.

Your control over the server cache depends on your web host. You may be able to find some options to clear the cache in the control panel. And if you are unclear about this, just contact the support team for help. Also, it is possible to ask the support team to do all the things for you.

For the server cache used by a CDN, you can also contact the service provider for the steps to clear it. In fact, most CDN providers will make it simple to purge cache. For example, CloudFlare provides a "Purge Cache" option which allows you to choose either to clear all cache or only clear the cache of individual file(s). A dropdown of all individual files is available so that you can make a selection easily.

Clear Cache in CloudFlare

By following the tutorials above, you should be able to clear the cache of your WordPress site successfully.