# Joomla & LiteSpeed Cache

> Use .htaccess rewrite rules to enable LiteSpeed Cache for your Joomla site and improve page load performance.

Source: https://www.kualo.com/knowledgebase/perf-litespeed/joomla-litespeed-cache
Updated: 2026-06-04

---

LiteSpeed Cache (LSCache) is a server-level page caching solution built into LiteSpeed Web Server. When used with Joomla, it can deliver significant performance gains with minimal configuration. The rules below let you control caching behaviour directly via your `.htaccess` file.

## Where to add the rules

Open the `.htaccess` file in the document root of your Joomla site and add the rules immediately before this line:

```bash
## Begin - Joomla! core SEF Section.
```

## The rewrite rules

```apache
########## Begin - LiteSpeed Cache
<IfModule LiteSpeed>
  RewriteEngine On
  CacheDisable public /
  RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
  RewriteCond %{HTTP_HOST} ^domain.com [NC] [OR]
  RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
  RewriteCond %{ORG_REQ_URI} !/administrator
  RewriteRule .* - [E=Cache-Control:max-age=3600]
</IfModule>
########## End - LiteSpeed Cache
```

## Notes

- Replace `domain.com` and `www.domain.com` with your actual domain name.
- The cache TTL is set to 1 hour (3600 seconds). To change it, update the `max-age` value in the `RewriteRule` line - for example, `max-age=86400` for 24 hours.
- The `/administrator` condition ensures the Joomla admin area is never cached.

:::tip
If you are running a newer version of Joomla, check whether a dedicated LiteSpeed Cache plugin is available for your version, as it may offer more granular cache management than these rewrite rules alone.
:::


---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/perf-litespeed/joomla-litespeed-cache · © Kualo Ltd._
