Speed Up Drupal with LiteSpeed Cache

Drupal's performance can be greatly improved with LiteSpeed Cache especially if you have a high traffic website. 

* To enable LiteSpeed Cache if you are on our Managed/Dedicated Cloud Server, please contact our Billing Department (it's Free).

To enable LiteSpeed Cache with Drupal, add the following codes to the .htaccess file:-
<IfModule LiteSpeed>
CacheEnable public
RewriteEngine On  
RewriteCond %{REQUEST_METHOD} ^GET|HEAD|PURGE$
RewriteCond %{REQUEST_URI} !admin|register|login [NC]
RewriteCond %{HTTP_COOKIE} !SESS [NC]
RewriteCond %{QUERY_STRING} !nocache
RewriteRule .* - [E=Cache-Control:max-age=300]
</IfModule>

Note:-

  • The codes above must be at the top of the .htaccess file. 
  • To view the non-cached version of any URL, just add &nocache to the end of the URL.
  • If you have more than one domain in your public_htmldirectory, add the following line before the last two lines:-
    RewriteCond %{HTTP_HOST} ^YourDomain.com [NC]

Was this answer helpful?

 Print this Article

Also Read

What is LiteSpeed Cache?

LiteSpeed Cache, also known as LiteSpeed Dynamic Content Cache is a server level caching system...

Speed Up MediaWiki with LiteSpeed Cache

MediaWiki's performance can be greatly improved with LiteSpeed Cache especially if you have a...

How To Setup LiteMage Cache

LiteMage Cache is the world's fastest Magento Full Page Cache. LiteMage Cache uses the LiteMage...

Speed Up WordPress with LiteSpeed Cache

WordPress performance can be greatly improved with LiteSpeed Cache especially if you have a high...

Speed Up Joomla with LiteSpeed Cache

Joomla's performance can be greatly improved with LiteSpeed Cache especially if you have a high...