# How to integrate LiteSpeed Cache into Drupal 8

> Enable LiteSpeed Cache in Drupal 8 by editing your .htaccess file, enabling the cache in cPanel, and installing the official module.

Source: https://www.kualo.com/knowledgebase/perf-litespeed/how-to-integrate-litespeed-cache-into-drupal-8
Updated: 2026-06-09

---

This guide walks you through integrating LiteSpeed Cache into a Drupal 8 site for improved speed and performance. You may also want to read our guide on integrating Redis in Drupal 8 for database and query caching.

## Step 1 - edit your .htaccess file

Add the following lines to the very top of your site's `.htaccess` file:

```apacheconf
<IfModule LiteSpeed>
CacheLookup on
</IfModule>
```

You can edit `.htaccess` over FTP or SSH, but the simplest method is via cPanel's [File Manager](/knowledgebase/cpanel-how-tos/how-to-use-file-manager-in-cpanel). Navigate to the folder containing your Drupal files, then click the `.htaccess` file to edit it.

## Step 2 - enable LiteSpeed Cache in cPanel

Make sure LiteSpeed Cache is enabled in cPanel under **LiteSpeed Cache**. See our guide on how to enable LiteSpeed Cache in cPanel if you have not done this yet.

## Step 3 - install the LiteSpeed Cache module in Drupal

1. Log in to the Drupal admin area and go to **Extend > Install new module**.

   ![Install new module](https://kb-cdn.kualo.com/41/de/41decdbeae4525bdb4b6460d6645ef633f50f3ab.png)

2. In the **Install from a URL** field, paste the following URL for the official LiteSpeed Cache module:

   ```
   https://github.com/litespeedtech/lscache-drupal/archive/master.zip
   ```

   ![Install from URL](https://kb-cdn.kualo.com/b1/e0/b1e06aacdcacad7c32da133186b2ac6c55e78f92.png)

3. Click **Install**.

4. Once you see the "Installation was completed successfully" message, click **Enable newly added modules**.

   ![Enable module](https://kb-cdn.kualo.com/85/52/85527d09d0799817c1da4ab974311566156719c3.png)

5. On the next page, search for the LiteSpeed module, tick the box next to it, and click **Install**.

   ![Install module](https://kb-cdn.kualo.com/c3/f3/c3f3a2b8e51234a9e8aa5a0acad11ed131735eff.png)

   You should see a success message confirming the module is active.

   ![Success message](https://kb-cdn.kualo.com/b7/0b/b70bd72cbdfc2d96b4242da6d64d78a7105af567.png)

## Verifying that caching is working

To confirm LiteSpeed Cache is active, open your browser's developer tools, go to the **Network** tab, and inspect the response headers for your site. You should see LiteSpeed-related cache headers in the response.

![Response headers](https://kb-cdn.kualo.com/73/dc/73dc42db96a3bbf427af2c037340eaef4215b4a2.png)

## Configuring LiteSpeed Cache settings

To adjust advanced settings, go to **Configuration > LSCache Settings** in the Drupal admin area.

![LSCache Settings](https://kb-cdn.kualo.com/13/b4/13b4b778582d2e8991e64f734b9317acf5ec2583.png)

From here you can:

- Manually clear the cache
- Disable caching entirely
- Enable or disable debug mode
- Change the public cache TTL (the time in seconds before cached content expires automatically)


---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/perf-litespeed/how-to-integrate-litespeed-cache-into-drupal-8 · © Kualo Ltd._
