Clearing the cache in WordPress
If you use a caching plugin for WordPress, you may have to clear the cache occasionally, and this article shows you how.
WordPress does not have a built-in caching mechanism. However, many people use a caching plugin to help improve performance.
When caching is enabled, some types of changes (such as theme modifications) do not appear immediately. This article discusses how to clear the cache so you can be certain you are viewing the most recent version of your site.
Tip
Before you try to clear the WordPress cache, make sure your own web browser cache is not storing outdated content. For information about how to clear the web browser cache, please see this article.
If you have a Turbo hosting account, you may need to clear the LiteSpeed cache on the web server. For information about how to do this, please see this article.
If you are using Cloudflare, you may need to purge its cache as well. For information about how to do this, please see this article.
W3 Total Cache plugin
W3 Total Cache is a popular caching plugin for WordPress. You can clear its cache from the administrative GUI, or from the command line with the WP-CLI program.
Using the WordPress administrative interface
To clear the cache for W3 Total Cache using the administrative interface, follow these steps:
-
Log in to WordPress as the administrator.
-
In the left sidebar, click Performance, and then click Dashboard. The W3 Total Cache page appears.
-
To clear all of the caches at once, click empty all caches.
Tip
Alternatively, you can clear specific caches:
-
To clear the memcached cache, click empty only the memcached cache(s).
-
To clear the opcode cache, click empty only the opcode cache.
-
To clera the disk cache, click empty only the disk cache(s).
-
Using WP-CLI
To clear the cache for W3 Total Cache using the command line, follow these steps:
-
Log in to your account using SSH.
-
At the command prompt, change to the directory where WordPress is installed. For example, type
cd ~/public_html
. -
Type the following commands:
wp w3-total-cache flush all
wp cache flush all
Other caching plugins
If you use a caching plugin other thanW3 Total Cache, read that plugin's documentation for information about how to clear the cache.
More Information
For more information about using caching with WordPress, please visit https://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens.
Related Articles
Updated about 17 hours ago