All Collections
WordPress Management
How to Clear the LiteSpeed Cache
How to Clear the LiteSpeed Cache

Learn how to purge the LiteSpeed cache on your website

Updated over a week ago

What Is Litespeed Cache?

LiteSpeed Cache is a caching plugin for WordPress designed to improve the website's performance and speed by caching static pages and posts, reducing the loading time and strain on the server.

You can learn more about it in this video tutorial:

Caching is generally helpful, though it may delay the visibility of website changes, which can be an issue during website development. If you want to see the latest changes immediately, here are a few options to clear the LiteSpeed cache:

Using the LiteSpeed Cache Plugin

The easiest way to clear the cache is to use LiteSpeed Cache tools. You can find this option at the top of your WordPress administrator panel. Hover the mouse over the LiteSpeed ​​Cache icon to Purge All or a specific cache:

The LiteSpeed Cache icon in the upper toolbar within the WordPress admin panel

You may also find these options in LiteSpeed Cache Toolbox on the left:

The Toolbox section in the LiteSpeed Cache plugin's settings

Setting a Scheduled Purge Time

The LiteSpeed Cache plugin lets you schedule purge time. Go to LiteSpeed Cache Cache and open the tab Purge:

The Purge tab in the LiteSpeed Cache plugin settings

Scroll down to find the section Scheduled Purge Time, and select the preferred time to purge the cache automatically:

The button to specify the preferred time for scheduled purge time

Finally, save the changes.

Clear the LiteSpeed Cache Manually

To purge the cache manually, open your website's File Manager, access the public_html folder, and find the .htaccess file. Double-click to open it:

The .htaccess file in the public_html folder

Remove the following lines from the file:

The lines to remove from the .htaccess file in order to clear LiteSpeed cache

Finally, save the changes and the cache will be removed.


Clear the LiteSpeed Cache Through SSH

You may also clear the LiteSpeed Cache via SSH. After accessing SSH, go to the WordPress folder. By default, the path is domains/your-domain-name.tld/public_html, so you can access the folder using this command:

cd domains/your-domain-name.tld/public_html

To remove the cache, use these commands:

wp cache flush
wp litespeed-purge all

The result will be:

The commands for clearing LiteSpeed cache via SSH

The cache is purged successfully!

Did this answer your question?