How to Disable LiteSpeed Cache on Your Domain

You are here:
Estimated reading time: 1 min

About this Document

Our Premium Super Fast Hosting Accounts use LiteSpeed web server over the normal Apache web server. LiteSpeed provides excellent improved performance and also provides caching as part of this.

Some users may wish to disable this in order to use another caching method or to stop the website from being cached at all.

How Do I Disable LiteSpeed Cache?

To disable cache, you need at add some code to your .htaccess file. You should find this in the root directory of your website.

Here’s the Steps to Take

  1. Log in to your cPanel account or connect to your webspace via FTP
  2. Navigate to the File Manager (on cPanel) and locate the public_html folder
  3. Find the .htaccess file in the root of your website
  4. Add the code below to the .htaccess file
  5. Save the file

The code you need to add is:

RewriteEngine On
RewriteRule .* - [E=Cache-Control:no-cache]

If you are using cPanel and can’t see the .htaccess file, click the settings button in the top right of the file manager screen, tick the box that says ‘Show Hidden Files (dotfiles) and click Save.

What Now

All a few minutes and cache will be disabled and no longer active on your website.

This will disable LiteSpeed cache on everything in your public_html folder. This includes subdomains and directories etc.

To Re-Enable LiteSpeed Cache

To re-enable cache, simply remove the code you added above from the .htaccess file.

Was this article helpful?
Dislike 0
Views: 4096