}
The following article assumes you've installed CraftCMS version 3 on your account.
To use the LiteSpeed Cache module, you must be on a plan that supports LiteSpeed Cache. LiteSpeed Cache is available on all Business Hosting plans and as an addon to Solo and Startup plans. If you need assistance with checking if LIteSpeed Cache is available on your account, please open a support ticket on our HelpDesk.
Make sure you have enabled LiteSpeed Cache in cPanel. If you're not sure how to do this, please see the following KB Article
Below are the steps to install the plugin through the CraftCMS Dashboard. To install via SSH please see below
1.) Log into your CraftCMS Admin panel.
2.) Click the 'Plugin Store' menu
3.) In the store, search for LiteSpeed Cache
4.) Click on the 'LiteSpeed Cache' plugin and click 'Install'
SSH Access must be enabled to use the below commands. Please open a ticket on our HelpDesk if you need SSH access enabled.
1.) Navigate to your Craft project folder.
2.) Run the following composer command:
composer require thoughtfulweb/lite-speed-cache
Once the plugin is installed, there are a few more steps to complete the setup.
1.) Log into the CraftCMS Dashboard.
2.) Click on Settings > Plugins.
3.) Click the gear icon next to LiteSpeed Cache and choose Install.
4.) Once installed, click the 'Settings' link.
5.) Enable 'Clear caches per URL' unless you plan on using Cloudflare. Due to Clouflare's reverse proxy, you cannot use CloudFlare with per-URL purging.
6.) Enter the following in your .lscache Location box: /home/USER/.lscache/ (change 'USER' with your cPanel username).
7.) Click 'Save' in the upper right side of the page.
8.) You'll then need to add the following lines of code to the top of your .htaccess file:
########## Begin - Litespeed cache
<IfModule LiteSpeed>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{ORG_REQ_URI} !/admin
RewriteCond %{ORG_REQ_URI} !/index.php/admin
RewriteRule .* - [E=Cache-Control:max-age=86400]
</IfModule>
########## End - Litespeed cache
YOU ARE DONE!! LiteSpeed Cache should now be enabled. You can check that LIteSpeed Caching is working by following the steps in this KB Article
If you need help with any of the above, please contact our support team on our HelpDesk
The LiteSpeed Cache can be forcefully purged from the Dashboard:
1.) From the Dashboard, Click the 'LiteSpeed Cache' menu.
2.) Click the 'Clear LiteSpeed Cache' button
Powered by WHMCompleteSolution