The Marketplace of Ready-Made WordPress websites for making your project succeed
How to Clear Cache in Your WordPress Site: Browser, Server, Plugin, CDN

How to Clear Cache in Your WordPress Site: Browser, Server, Plugin, CDN

Sharing is caring!

When it comes to performance and loading time, a caching system is as important as choosing the right WordPress theme and web host, optimizing images, using a CDN (Content Delivery Network), and so on.

Most WordPress sites have some sort of caching system in place. It can be at a server level or handled by a plugin. Even the browsers pitch in by storing files in their cache from the websites that we visit.

But caching, while very useful, can sometimes prevent updates from showing up on your site. So, in this tutorial, I’ll show you how to clear the cache in your WordPress site.

What’s Cache – A Quick Explanation

Before showing you how to clear your WordPress cache, let’s see what’s caching and why is it important.

First, I’ll give a more techy explanation. Then, I’ll use a simple analogy to make you understand better.

Before understanding how caching works, you need to understand how a web page is usually provided without caching. Here’s how it works:

  1. When a user accesses one of your web pages from Google or wherever, an HTTP request is performed;
  2. That HTTP request tells the server what web page to prepare in order to be delivered to the user;
  3. The server starts compiling/creating that web page, putting all the pieces together: images, text, scripts, etc.;
  4. Once the server is done compiling, the web page is served and displayed to the user by the browser.

Compiling those pages can take some time, depending on the server, amount of content, etc. This is where caching comes in handy, speeding up the process.

In a nutshell, the cache holds copies of your web pages to serve the content faster to the user, hence improving the loading time. So:

  1. The user accesses your web page, generating an HTTP request;
  2. The HTTP request tells the server what web page to prepare;
  3. Instead of creating the web page from scratch, the server grabs a copy of it, which is stored in the cache;
  4. The copy is delivered, and the web page is displayed by the browser.

So, serving a ready-made web page is faster than creating it from scratch first.

The analogy

As promised, I’ll use a simple analogy to better understand the caching process and purpose.

Let’s say that you go to a fast-food restaurant and order a hamburger. This is what usually happens:

  1. You place the order;
  2. The cashier takes your order and tells their colleagues in the kitchen what to prepare;
  3. They start making your hamburger: getting the bun, cooking the patty, adding mustard, etc.;
  4. Once they’re done, you receive the hamburger.

That can take several minutes.

Now, imagine that the fast-food restaurant has a caching system 🙂. The process would be like this:

  1. You place the order;
  2. The cashier takes your order and tells their colleagues in the kitchen what to prepare;
  3. They say that it’s already done. There’s no need to prepare it from scratch;
  4. You receive the hamburger right away.

That would be a lot faster, right?

I hope you got the idea. Let’s move on to our main topic now.

Looking for an All-in-One WordPress Solution?

ReadyShip offers you ready-made WordPress sites and blogs, plus high-quality managed AWS hosting with free SSL and CDN, at no initial cost!

How to Clear Cache in Your WordPress Site

A WordPress site can be cached in multiple ways, using a lot of different tools. So, it would be virtually impossible for me to provide specific instructions for every tool or environment, but I’ll point you in the right direction.

1. Browser cache

Browsers help by storing files in their cache, too, to speed up the content deliverability for the users.

So, when you load a website that you previously visited, or a new one that has elements (e.g. fonts) used by other previously visited websites, the browser usually displays locally saved files.

Usually, when it notices a change in the web page, the browser doesn’t go for the copy, but the process doesn’t always work right. Therefore, you’ll have to clear the cache to view the changes on the web page.

Normally, I don’t recommend clearing the entire browser cache if you can’t see the changes on your WordPress site. Instead, you should do one of the following:

  1. On major browsers, press CTRL+F5 (Windows) or Shift+Command+R (macOS) on your keyboard. On the Safari browser, I think that you need to press Command+Option+R. This is called a Hard Refresh, and it clears the cache for that specific web page.
  2. View the web page in an Incognito/Private browser window because they don’t normally use the stored cache. They start fresh and store things until you close the window.

2. Server cache

WordPress caching handled at a server level is better, compared to plugins.

So, if your web host has a built-in caching system for WordPress, you should stick with that, and not use a plugin unless it’s their plugin, which communicates with the server’s caching system.

Now, there are a ton of web hosts out there with different caching systems and environments. I can’t go into all of them, but I’ll tell you where you should look.

WordPress admin bar

Usually, most web hosts that provide WordPress caching at a server level add a Clear Cache button in your WordPress admin bar.

clear cache wordpress

Some web hosts go the extra mile and also create a plugin with several features so you can have more control over the caching system.

For example, Cloudways has Breeze, SiteGround has SG Optimizer, and so on.

Breeze caching plugin from Cloudways
Breeze caching plugin from Cloudways

Web host’s control panel

Most web hosts provide a control panel, either their own or a 3rd party one, such as the popular cPanel. Shared web hosts tend to provide cPanel, while Managed ones tend to create their own.

So, if your web host provides caching at a server level, but doesn’t add a button in your admin bar nor provides a plugin, then log in to the control panel and try to clear the cache of your WordPress site there.

purge varnish cache in cloudways
Purge Varnish cache in Cloudways

3. Plugin cache

A lot of WordPress sites depend on caching plugins. There are plenty of them, so I’ll only show you how to clear the cache in your WordPress site using the most popular plugins.

But, as a general rule, virtually all caching plugins allow you to purge your WordPress cache using two methods:

  1. A button in the admin bar;
  2. A button in the settings page.

Clarification for beginners: Caching plugins are not plugins that you install to clear whatever cache your WordPress site has from other places. They are used to create a caching system for your site, and can only clear their own cache.

WP Rocket

If you’re using WP Rocket, you can clear your WordPress cache by clicking on Clear cache from the WP Rocket drop-down menu that’s placed in the admin bar.

clear wordpress cache with wp rocket

Alternatively, you can go to Settings > WP Rocket > Dashboard and click on the Clear Cache button there.

clear wordpress cache from wp rocket dashboard

WP Rocket also allows you to clear the WordPress cache of individual pages, which is a better choice if you don’t perform a sitewide change.

View any page in the front-end, hover over WP Rocket in the admin bar, and select Purge this URL.

purge this ulr wp rocket

W3 Total Cache

If you’re using the W3 Total Cache plugin, you can clear the cache in your WordPress site by clicking on Purge All Caches from the Performance drop-down menu found in the admin bar.

purge all caches in w3 total cache plugin

Alternatively, you can clear your WordPress site’s cache by going to Performance > Dashboard and clicking on the empty all caches button.

empty all caches in w3 total cache

W3 Total Cache also lets you clear the cache of a specific WordPress page.

For that, visit the WordPress page in the front-end, then click on Purge Current Page from the Performance drop-down menu found in the admin bar.

purge current page in w3 total cache

WP Super Cache

The WP Super Cache plugin has a simple Delete Cache button in the admin bar that you can use.

delete cache with wp super cache

You can also clear the WordPress cache by going to Settings > WP Super Cache > Easy and clicking on the Delete Cache button.

delete cache wp super cache

Although not that obvious, WP Super Cache also allows you to clear the cache of individual pages.

If you visit a page in the front-end, and you hover over the Delete Cache button, you’ll see that it writes Delete cache of the current page.

delete cache of the current page with wp super cache

So, when checking pages in the front-end, the Delete Cache option doesn’t apply to the entire WordPress site anymore. It’s an important thing to keep in mind if using this plugin.

WP Fastest Cache

If you’re using the WP Fastest Cache plugin, you can clear the cache in your WordPress site by clicking on Clear All Cache from the Delete Cache drop-down menu found in the admin bar.

clear all cache from wp fastest cache

You can also go to WP Fastest Cache from your dashboard’s menu, select the Delete Cache tab, and click on the Clear All Cache button.

clear all cache from wp fastest cache

Like the previous plugins, WP Fastest Cache allows you to clear the cache of individual pages.

All you have to do is to visit the page in the front-end, hover over Clear Cache in the admin bar, and select Clear Cache of This Page.

clear cache of this pgae with wp fastest cache

Looking for an All-in-One WordPress Solution?

ReadyShip offers you ready-made WordPress sites and blogs, plus high-quality managed AWS hosting with free SSL and CDN, at no initial cost!

4. CDN cache

If your WordPress site is meant to have a global audience, not local, then you should definitely use a CDN (Content Delivery Network) to improve the loading time. If you do, keep in mind that they can also have a caching system of their own.

Cloudflare is the most popular one, thanks to its free plan.

To clear your WordPress site’s cache in Cloudflare, go to Caching > Configuration and click on the Purge Everything button.

purge cache in cloudflare

If you only want to purge the cache of a specific WordPress page, then choose Custom Purge.

In the box at the bottom, add the URL of the page as you see in the examples provided. Then, click Purge.

custom purge cloudflare

Some web hosts, such as ReadyShip, have a CDN automatically integrated for every WordPress site. So, you might find a button in the admin bar to clear the CDN cache.

The turnkey WordPress websites that you can get from ReadyShip come with free Cloudfront CDN. And the team added a Clear All CDN Caches feature in the admin bar of WordPress.

Tips

Tip 1: Sometimes, if a change doesn’t show up, you might need to clear the cache of your WordPress site in more than one place. For example, you might need to clear it from the server or plugin, browser, and CDN.

If you implement an update that you want to be immediately available to the users, it’s best to clear all the caches right away to make sure everyone sees the update.

Tip 2: Don’t use more than one caching system, especially when it comes to plugins, because it creates conflicts. More caching plugins don’t mean better performance. It means bloat and chaos.

An exception could be when using a CDN that also provides caching. You can leave the caching enabled on your WordPress site to work along with the one from the CDN, especially when the CDN can’t cache HTML.

Tip 3: In general, WordPress caching plugins don’t include the back-end (WordPress dashboard) in their cache by default. So, you shouldn’t worry about it unless you enable that feature.

Tip 4: Don’t use a caching plugin when you build your WordPress site because it will be annoying to clear the cache often. Install a plugin when you’re finished, and the site goes live.

Looking to Buy or Sell WordPress Sites?

At ReadyShip, we offer an all-in-one WordPress solution for those looking to start a blog or site, as well as the opportunity for WordPress developers or professionals to sell their products!

The End

WordPress caching is crucial for performance, but it can be frustrating when you’re a beginner and don’t know why the changes don’t show up on your website.

But, in this tutorial, you found out why that happens, and how to clear the cache of your WordPress site to make the updates show up.

If you have questions or thoughts, feel free to leave a comment.

Sharing is caring!

Radu

Hey! I'm Radu, and I've been working with WordPress at personal and professional levels for over 8 years now. I'm a seller on ReadyShip, and I'm also writing posts for their blog, which I hope you'll like. You can find more about me at Radu.link. I'm also quietly on Twitter @RaduWP.

Leave a Reply

Close Menu
shares