How to Clear Cache in WordPress: 6 Simple Methods
Having a fast-loading site is essential for user experience and SEO (Search Engine Optimization). Websites with optimized speed tend to have lower bounce rates, which results in higher engagement and conversions. Google also favors fast websites and ranks them higher on the search results page.
Many components affect website speed, from coding standards to the hosting provider. Consequently, there are many ways to speed up site performance, and web caching is one of the most effective.
Web caching stores copies of your site data for future requests. Instead of downloading original data from the server, web caching fetches these cache files to your website visitors. Thus, your content is displayed more quickly.
However, cached files can expire – this will prevent visitors from seeing the updated version of your website.
To solve this issue, we will show you how to clear cache in WordPress using popular plugins. We will also include steps to remove the browser cache for more effective results. Let’s start with an explanation of what cache is and how it works.
Clear WordPress Cache – Video Tutorial
Learn how to clear WordPress cache to optimize your website speed with this video tutorial.
What Is WordPress Cache
Whenever you visit a website, your browser sends requests to the site’s server. It might take a minute or two for the server to fetch and display the requested content – web caching makes this process faster.
Web caching downloads the site’s static content and stores it as cache files. As a result, your browser can create fewer requests to the server as it already has the cached content.
There are two main systems of web caching:
- Client-side caching – also known as browser cache, this type of caching stores the static content in local storage. When a user revisits the website, it will load faster since the cached version is already stored in the browser cache folder.
- Server-side caching – has a similar concept to client-side caching. However, it uses a server to store the cached data of a website. Server cache can store various site data from multiple databases, making it a great solution for high-traffic websites.
All in all, web caching reduces requests to your server by storing a static version of your website – thus, increasing your site performance.
It also reduces your network resources since processing fewer requests requires less bandwidth, which can benefit websites with limited resources.
How to Clear Cache in WordPress
Sometimes you change and tweak your WordPress website, but your content is not updating on the front-end. This might happen because your WordPress server is still displaying the cached version of your pages.
Fortunately, clearing out your WordPress cache usually fixes this issue. When your website cache is empty, the caching system can store the updated data and display it to your visitors.
The easiest way to clear cache in WordPress websites is by installing plugins. The following section will explain how to clear your cache using four popular WordPress caching plugins and show how to clear cache when your domain is pointed to Cloudflare.
Clear Cache with LiteSpeed
Use the LiteSpeed Cache for WordPress (LCWP) plugin to efficiently manage how your cache is stored and used. This caching plugin uses LiteSpeed server cache to improve site loading time and comes with LiteSpeed exclusive optimization features.
All of Hostinger’s web hosting plans, including WordPress-optimized ones, are LiteSpeed-powered and the plugin comes pre-installed in every hosting account. However, if you’re using a different web host, simply navigate to the WordPress plugin directory to download the plugin.
The LiteSpeed Cache plugin offers multiple ways to clear WordPress cache. From setting automatic cache purge based on specific conditions to including specific website URLs for a scheduled purge. Follow the instructions below for that:
- Once you install and activate the plugin, access your WordPress admin dashboard. Then, go to LiteSpeed Cache.
- Choose the Toolbox menu, and the LiteSpeed Cache Toolbox window will appear.
- There are various types of cache you can purge, from page cache to CSS/JS cache. Choose which type of cache purge you want to perform.
- If you want to clear your WordPress cache entirely, choose Purge All. Note that it won’t delete critical data on your WordPress website – you can go ahead and clear the cache.
- However, if you only want to empty the cache from certain parts of your site, scroll down to the Purge By section. From there, input your content using a category, tag, or URL.
In addition to accessing your WordPress dashboard, you can also clear the cache of a specific page by visiting it – just keep in mind that you need to log in as an administrator. Simply hover over the LiteSpeed icon on your admin bar and choose Purge this page.
Clear Cache With WP Super Cache
WP Super Cache modifies the caching system in your WordPress site using three caching modes: WP caching, Simple, and Expert.
The Expert and Simple methods serve super cached files, so they are excellent solutions for high-traffic websites. The only difference is that the Expert method involves rewriting rules in your .htaccess file for faster performance. Meanwhile, the WP caching method caches logged-in users, such as visitors who leave comments or store personal information on your site.
This WordPress caching plugin can also flush cache files with a single click. Simply follow the steps below to do so:
- From your WordPress admin dashboard, go to Settings -> WP Super Cache.
- In the WP Super Cache Settings page, scroll down to the Delete Cached Pages section. Then, click on the Delete Cache button.
Additionally, the WP Super Cache plugin provides a wide array of caching features, with the most prominent feature being garbage collection. Users can set a cache timeout, and the system will clear cache files accordingly. To do so, follow the instructions below:
- Go to Settings -> WP Super Cache -> Advanced. Then, scroll down to the Expiry Time & Garbage Collection.
- Set your cache timeout and interval as you need.
If you don’t update your WordPress site often, setting it to 3600 seconds would be ideal. However, owners of busy websites with a lot of dynamic content, like an eCommerce site, should set it to 600 seconds to prevent slow performance.
- Next, click Change Expiration to save the changes.
- If you want to disable garbage collection, simply set the cache timeout to 0 seconds.
Clear Cache With W3 Total Cache
W3 Total Cache is one of the most popular caching plugins known for its customization and bandwidth-saving features. This plugin saves up to 80% bandwidth usage via minification, feed optimization, and HTTP compression. It offers multiple caching abilities, including browser, database, and site cache.
This caching plugin also comes with AMP support that helps improve SEO performance. Moreover, users can use its WP-CLI support command interface to perform various tasks, such as cache purging and query string updating.
Here’s how to clear WordPress cache using W3 Total Cache:
- Once you install this caching plugin, access your WordPress admin area and go to Performance -> Dashboard.
- Click the empty all caches button located at the top of the page.
- The system will begin clearing your WordPress cache. Once it’s over, you should see this message.
- Apart from the empty all caches button, there are other buttons for deleting multiple cache types, including clearing only the Memcached cache from the database. Simply click on the button to start the action accordingly.
Clear Cache With WP Fastest Cache
WP Fastest Cache is another popular caching plugin famous for its various optimization and caching features, such as minifications, cache preloading, and GZIP compression. It comes with an intuitive dashboard and uses mod_rewrite to provide the fastest caching solution.
Users can enable cache timeout to save the hassle of clearing the cache manually. The plugin can also automatically delete all cache files whenever a new page or post is published – this prevents outdated data from being displayed on your WordPress site.
Follow these steps to perform automated cache purging with WP Fastest Cache:
- From your WordPress admin area, navigate to WP Fastest Cache. It will open the WP Fastest Cache Options page.
- From there, tick the box next to the Cache System setting. Once you enable the caching, the plugin will regularly clear your cache.
- If you want to clear cache files whenever a post or a page is published, simply check the New Post and Update Post settings.
- To enable more features, go ahead and tick the box on each setting. Be sure to click the Submit button to save changes.
To manually clear your WordPress site’s cache:
- Go to WP Fastest Cache and select the Delete Cache tab.
- From there, press the Delete Cache button.
- At the bottom of the page, you will find the Timeout Rules setting. Simply click Add New Rule to set an expiry time.
- A pop-up window will appear. There, you can configure the condition of pages or posts you want to cache and how often you would like to delete them. Click Save to add the rule.
Clear Cache with Cloudflare
Apart from using WordPress caching plugins, you can use Cloudflare to clear your cache. It’s a content delivery network (CDN) service that comes with numerous features to improve your website performance, including cache control, fast cache purge, and web cache protection.
In order to set up the CDN, clear your WordPress cache with this method, and point your domain to Cloudflare. Those who have active Cloudflare services from Hostinger won’t need to point domains to Cloudflare nameservers, as these changes will be done automatically.
If your WordPress host doesn’t automatically set Cloudflare for you, follow these steps below:
- Create a Cloudflare account.
- Add your domain name and wait for the system to identify your DNS records.
- Select a plan level.
- When Cloudflare presents the required nameservers, simply copy the values and update your nameservers from your hosting account dashboard.
Once your domain is pointed to Cloudflare, follow these steps to clear your WordPress cache:
- Log into your Cloudflare dashboard and click on your WordPress site’s domain.
- Navigate to the Caching menu and click Configuration.
- Choose your preferred method of clearing the cache. To clear all cache files, click on the Purge Everything button. If you want to select specific pages, choose Custom Purge and fill out the pages you want to purge.
Clear Cache in a Browser
Clearing your own browser cache also helps troubleshoot loading and formatting issues. It will remove outdated files, allowing your browser to fetch a new version of your site. Doing so can also fix server-related issues, including the 502 bad gateway and 504 gateway timeout.
Keep in mind that removing the browser cache might also delete your browser data, such as bookmarks and setting preferences. Thus, be sure to export your data from the browser and import it back once you finish clearing the cache.
The following steps will show you how to clear the cache in Google Chrome. Note that the same steps apply to other browsers as well.
- Open your Chrome application.
- Click on the three-dot (⋮) menu at the top right corner of your screen.
- Choose More tools -> Clear browsing data.
- It will take you to a page where you can perform Basic or Advanced cache clearing.
- Choose your preferred method, set the time range, and check the boxes as you need. Leave the Passwords and other sign-in data option unchecked to keep your login credentials.
- Finally, click on the Clear data button.
Caching is a great way to make your website load faster – it stores copies of your site’s static content for future reusing. However, outdated cache files can prevent visitors from seeing new changes on your website.
Luckily, clearing your website cache can solve this problem. This tutorial has shown you how to clear cache in WordPress using popular caching plugins. If removing the WordPress server cache doesn’t solve the problem, try clearing your browser cache as well.
Note that once the cached files are removed, browsers and servers will need some time to download them again – which might result in a slightly longer loading time compared to before.
We hope this article has been helpful. If you have any questions about the WordPress cache, feel free to leave a comment.