How to Clear the WordPress Cache and Why You Should

Spread the love

Google takes many factors into consideration when deciding which sites to rank higher than others in the search results. One of the main factors is site speed. Enabling the cache is one way of ensuring a speedier site. Follow this guide to learn why and how to clear the WordPress cache. Also covered here are the different types of caches you need to remember and where those settings are on your site.

Content

Also learn: how to create a sitemap in WordPress without a plugin.

Type of Caches to Clear

There is more than one WordPress cache to clear, and you should be aware of all of them. Let’s look at each one.

WordPress Cache

The WordPress cache is created by plugins or your hosting provider. It stores various website elements, like pages, database queries, and object data. Clearing it ensures that visitors see the most recent, updated information.

Object Cache

The object cache stores the results of complex PHP processes, like database queries. By doing so, it improves the performance of your website, by avoiding repeated calculations.

This cache is typically managed by WordPress cache plugins and will be cleared when you wipe the general WordPress cache.

CDN Cache

If you’re using a Content Delivery Network (CDN), it also has its own cache for storing the website’s static content closer to site visitors. This process helps to further improve loading times.

Clearing the CDN cache usually requires accessing your CDN provider’s control panel. The procedure may vary slightly, depending on the CDN you are using. It is typically a very straightforward process.

Firewall Cache

Some security plugins have website firewalls that can also have caching for specific elements of your website. These caches can be cleared by going to the WordPress plugin’s settings and looking for the option to clear it.

Why Would You Want to Clear the WordPress Cache?

If caching the site makes it go faster, why would you want to remove the cache?

The simple reason is that, if you make any changes to your site, such as the design or a new post, it won’t immediately be seen due to the cache files. Therefore, clearing the cache will show the updated version of the site.

You may also be having technical issues with your website, and clearing the cache sometimes helps to flush out the gremlins.

The cache will soon build up again, so any changes to the site speed will be minimal at best. But clearing the cache is generally not needed if the site has not been updated, or you are not having technical problems. It won’t harm the site if you do, but it doesn’t need to be done all the time.

How to Clear the WordPress Cache Without a Plugin

Via FTP

Although a plugin greatly simplifies everything on a WordPress website, it isn’t always the magic bullet. The more WordPress plugins you install, the slower your site is. Therefore, if you can do a task without a plugin, it will improve your experience.

Probably the easiest way to clear the WordPress cache is to go into the backend of the site. This is where all of the files and folders that keep the website running are kept. This can be anything from your themes to your pages.

You need an FTP program to access those files. Two good FTP programs are FileZilla and CyberDuck. Find your FTP details in your web hosting panel and log in with the FTP program, then find the WP-Content folder.

A folder called cache is in the WP-Content folder. Just delete all the files in that folder. You can also delete the object cache and the advanced cache.

Once you do, the site instantly makes a new cache folder and files, so nothing gets broken on your site.

How to Clear the Cache in WordPress With a Caching Plugin

As mentioned earlier, a WordPress plugin solves most website headaches. Assuming you are selective with the plugins you use, a caching plugin is one of the essentials.

There are so many to choose from in the WordPress directory, but the two mentioned here are among the best and should provide what you need:

1. WP-Optimize

WP-Optimize is one of the best WordPress caching plugins available. As well as caching, it also offers a wide range of automated options to optimize the running of your website, such as image compression, minification, and deleting trash files.

WP-Optimize has a page cache section, where you can flush the cache with one click.

2. W3 Total Cache

W3 Total Cache is the go-to caching plugin for many people. It is highly rated, has been around forever, and is frequently updated. You get your usual caching dashboard, and it is a simple case of clicking the Empty All Caches option at the top of the page.

How to Clear the Cache in Your WordPress Hosting

By necessity, this has to be a general section, simply because there are so many web hosting providers. Virtually all web hosting companies will have the same kind of setup. You just have to find the caching section.

Once you have found the caching section, there will be an option to wipe the cache. It’s as easy as that.

What About the Browser Cache?

Don’t forget that your browser also has a cache! If you want to see any changes to your site, flushing the browser cache may also be an essential move.

The location of the cache is usually in the Clear Browsing Data section of your browser. Go to the browser settings to find it. We have covered Microsoft Edge and Safari, but the process is virtually the same for Firefox and Chrome.

All screenshots by Mark O’Neill

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Mark O’Neill

Mark O’Neill is a freelance tech journalist, editor, and bestselling spy fiction author. Originally from Scotland, he now lives in Germany with his wife and his dog.

Leave a comment