2.14.5.11. Configure LiteSpeed Cache in Drupal 8

  1. Change the web server for the required site to OpenLiteSpeed.
  2. Add the following block of directives to the .htaccess file:
    <IfModule LiteSpeed>
      CacheLookup on
    </IfModule>
  3. Open the module page on GitHub and copy the link for "Source code (tar.gz)" (not zip):
  4. Install the module:
    1. Go to http://your_site.com/admin/modules/install.
    2. In the "Install from URL" field, paste the copied link to the module archive.
    3. Click "Install".
  5. Enable the module:
    1. Go to the address http://your_site.com/admin/modules.
    2. In the list of extensions, find the LiteSpeed Cache module.
    3. Mark the module with a checkmark.
    4. Click "Install".
  6. Configure the module:
    1. Go to the address http://your_site.com/admin/config/development/lscache.
    2. Set the value of the parameter "ESI" to "Off".
    3. Click "Save configuration".
  7. Check the site operation.

After performing the described actions, caching will start automatically.

The LiteSpeed Cache module settings are available at http://your_site.com/admin/config/development/lscache.

Block "CLEAR CACHE!":

  • "Clear this site" — the button for clearing the LiteSpeed cache of the current site on this virtual host. It can be useful when multiple sites are hosted on a single host.
  • "Clear all" — the button for clearing the LiteSpeed cache for all sites hosted on the current virtual host.

Block "LSCACHE SETTINGS!":

  • "Cache status" — enabling/disabling LiteSpeed cache.
  • "Debugging" — enabling/disabling the debugging mode. When enabled, the LiteSpeed cache will issue additional headers that may be useful during the development or deployment of the site.
  • "ESI" — enabling/disabling ESI support. It should be disabled because OpenLiteSpeed is used on the hosting.
  • "Maximum age" — the time pages are stored in the public LiteSpeed cache.
  • "Max age private" — the storage duration of pages in the LiteSpeed private cache.
Content