This is an old revision of the document!


Installing & Enabling The LSCache Plugin For WordPress

  • LiteSpeed Web Server Enterprise Edition 5.0.10+.
  • LSCache Module. (Included with a 2-CPU or higher license. Can be purchased as an add-on for VPS, Ultra VPS, and 1-CPU licenses.)
  1. Configure server and/or virtual host level cache root and cache policy by selecting your setup in the Web Server Configuration section of the LiteSpeed Web Cache Common Installation Guide.
  2. Disable any other page caches as these will interfere with LSCWP.
  3. Download the LSCWP plugin from our WordPress Plugin Directory page.
  4. Log in to your WordPress Dashboard, navigate to “Plugins”, and click on “Add New” → “Upload Plugin”.
  5. Select the LSCWP zip file and click “Install Now”.
  6. Enable the plugin by navigating to Plugins » LiteSpeed Cache » Settings and checking the box for Enable LiteSpeed Cache.

Note: If you are using any of our other LiteSpeed Cache plugins, please see Handling Logged-in Cookie Conflicts.

You can check if a page is being served from LSCWP by:

  1. Navigating to your site from a non-logged-in browser and using your browser's developer tools to check the response header for the first file.
    1. Right click on the page and select some form of “Inspect”, then click on the “Network” tab in the inspector.
    2. Refresh the page.
    3. Click the first resource (this should be an HTML file and the inspector should change similarly to the image below). For example, if your page is http://testsubdo.com, your first resource should either be something like testsubdo.com or /.

  1. In a different, logged-in browser, navigate to the cache manager and purge your cache.
  2. Reload the page in the non-logged-in browser and select the same resource again. If you see “X-LiteSpeed-Cache: miss”, “X-LiteSpeed-Cache-Control:public,max-age=1800”, and “X-LiteSpeed-Tag:F,B.1” (as an example), this will store the page in the cache.
  3. If you reload page a second time and see “X-LiteSpeed-Cache: hit” in the response header for the HTML file (usually listed first), then the page is being served by the cache and LSCWP is configured correctly.

Currently, this plugin only provides caching for non-logged-in users and further development is in progress.

Note: If your first refresh after purging returns “X-LiteSpeed-Cache: hit“ in the response header, this may be because someone visited the page after you purged but before you refreshed it yourself.

To enable the WordPress debug log, modify “wp-config.php” under WordPress' root directory as follows:

  1. Set “WP_DEBUG” to true.

    define('WP_DEBUG',true);
  2. Add the following:

    define('WP_DEBUG_LOG',true);

a “debug.log” file should now be generated under “wp-content” which will log information whenever WordPress hits the backend.

You can monitor this log during debugging using the following command:

tail -f wp-content/debug.log
  • Admin
  • Last modified: 2016/08/25 15:28
  • by Rob Holda