Performance and monitoring

LiteSpeed Cache for Joomla: install and set up

Reviewed on 3 min read performance LiteSpeed Cache Joomla

Our servers use LiteSpeed, which has a built-in page cache. The LiteSpeed Cache for Joomla plugin, made by LiteSpeed itself, connects Joomla to that cache: pages are generated once and later visits are served directly by the server, much faster. The current version (1.5) works with Joomla 3, 4, 5 and 6.

1. Turn off other page caches

In the Joomla administrator, go to Extensions > Plugins and disable System - Page Cache and any other page cache plugin, such as JotCache.

If you have Joomla's Gzip compression turned on, turn it off in System > Global Configuration > Server > Gzip Page Compression: the server already compresses on its own.

2. Add the rule to .htaccess

Edit the .htaccess file in the Joomla folder (from cPanel's File Manager) and add at the top:

<IfModule LiteSpeed>
    CacheLookup on
</IfModule>

Leave the rest of the file as it is. If you don't have a .htaccess, rename the htaccess.txt that comes with Joomla to .htaccess and add the block.

3. Install the plugin

  1. Download the latest version from the LiteSpeed Cache for Joomla page or from its GitHub repository (package folder).

    LiteSpeed Cache for Joomla download page

  2. In Joomla, go to System > Install > Extensions (in Joomla 3, Extensions > Manage > Install), Upload Package File tab, and upload the ZIP.

  3. The plugin installs and enables itself. Check it in Extensions > Plugins by searching for "LiteSpeed": it should have the green tick. If it has a red X, click it to enable the plugin.

    LiteSpeed Cache plugin enabled in Joomla

4. Check that it works

  1. Open the website in a private window (without logging in).
  2. Press F12, go to the Network tab and reload.
  3. Click the first request (the HTML document) and look for the X-LiteSpeed-Cache header: the first time it will show miss and, when you reload, hit.

You can also check it at check.lscache.io.

Clearing the cache and settings

The plugin clears only the affected pages when you edit an article. If you change the template or a module and don't see the change, go to Components > LiteSpeed Cache, where you can purge specific pages or the whole cache:

Joomla LiteSpeed Cache component for purging the cache

The advanced options (cache lifetime, exclusions, modules loaded separately with ESI) are in System > Global Configuration > LiteSpeed Cache, or in the component's Options:

LiteSpeed Cache advanced options in Joomla

The default values work for most websites. If a page shows another user's content (for example, the name of whoever logged in), add it to the exclusions.

To uninstall it, purge the whole cache, uninstall the extension from System > Manage > Extensions and remove the block from .htaccess.

You may also find useful

Something wrong or out of date? Tell us and we will review it.