How to enable LSCache for XenForo

Overview

This plugin only works on the following cPanel packages:

  • Ultimate
  • WP Professional

This article describes how to install LSCache Plugin on XenForo

LSCache for XenForo uses advanced cache-management tools and optimization features to create an unmatched user experience, provides premium optimization features for faster page loading and improved scores on page speed measurement sites.

Installation

  1. Download the LiteSpeed Cache for XenForo plugin package:

  2. Access the server hosting your XenForo installation, either directly or using File manager or FTP.

  3. Unzip the uploaded archive

  4. From the unzipped folder, copy all files under upload to the root directory of your XenForo 2 installation.

  5. In the XenForo control panel, navigate to the Add-ons section to complete the installation.

Configuration

Once you have downloaded and installed the plugin package, edit the .htaccess file in the XenForo root directory and add the code shown below to the top of the file:

`
CacheLookup public on
RewriteEngine On

cache

RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteCond %{REQUEST_URI} !/install/ [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]

no cache

RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteRule .* - [E=Cache-Control:vary=loggedin,E=Cache-Control:no-cache]
`

Verify Your Site is Being Cached

  1. Open LSCache Check Tool.

  2. Enter the URL you wish to check.

The tool will respond with an easy-to-read Yes or No result, and a display of the URL's response headers, in case you want to examine the results more closely.