The Beginner’s Guide to LiteSpeed Cache for WordPress

Litespeed for WordPress Plesk

Congratulations! You’ve installed the LiteSpeed Cache for WordPress plugin, activated it, and are ready to take the next step.

But what does that mean?

For a lot of us, the sight of the settings tabs is impressive enough to make you want to dive in. But others can become overwhelmed and feel almost frozen by the sheer number of options available.

Sound familiar? Don’t worry—you’ve come to the right place.

In this post, we’ll look at setting up LSCache in a quick, simple way. We’ll explore the major details you need to know to take full advantage of the LiteSpeed WordPress cache plugin.


What do I do now that I’ve installed LSCache for WordPress and activated it?

LSCache for WordPress basically serves two roles: it’s a full-page cache for a website’s dynamically-generated pages and a site-optimization plugin.

Many users who install LSCache focus on utilizing its caching functions and consider everything else to be the cherry on the cake.

The crucial thing to remember is you can enable the caching functions and ignore the rest of it. You have that freedom, which is one of the most appealing aspects of the LiteSpeed cache for WordPress.

When you activate it, you’ll see that everything is disabled. You can turn caching on by going to LiteSpeed Cache > Cache > Cache and switching Enable Cache to ON.

Now, you could leave your LSCache configuration there if you wanted to. You could forget about experimenting with additional settings and this WordPress cache plugin would likely cache your website brilliantly. We selected the default settings to work with most sites straight away.

As we move on, we’ll consider the Cache section’s first four tabs and their functions. They’re the cache’s most basic settings.

Using LSCache for WordPress as a Beginner

Cache Tab

On the Cache tab, the first option enables or disables the caching functionality. The rest of the settings let you define the content types to be cached. Everything is enabled by default. Feel unsure what these settings actually do? You may be best keeping them set to their respective defaults for the time being.


TTL (Time To Live) applies to the length of time, in seconds, that a page can stay in cache before it’s regarded as being stale. When a page’s TTL is reached, it’ll be cleared out of the cache. We selected default TTLs that should be suitable for the majority of websites, but you can feel free to adjust them as you see fit.

Purge Tab

In certain scenarios, pages should be cleared from the cache ahead of their natural date of expiry. In this section, you can set the rules for this behavior. Default selections should be suitable for most sites, though you can tweak them if that works best for you.

A Brief Example

Let’s say you create a fresh post. You can give it the tag “cakes” and publish it in your “cooking” category. When you do this, a number of pages will change: the homepage, the cooking category archive page, the cooking tag archive page, the author archive page, and possibly some others.

Each of the pages affected will have to be cleared to avoid stale content being served. These settings make it easier to change the rules to suit your site’s requirements.

Excludes Tab

You might find you don’t want to cache certain pages. The Excludes Tab options enable you to define which parts of your site should be excluded from caching. It’s unlikely that you’ll need to adjust these settings for most sites, and they’re available so that you can make custom exceptions to caching rules as required.


The Remaining Four or Five Cache Tabs

You will have either four or five remaining Cache tabs (depending on whether you enabled WooCommerce). They cover caching types that are more advanced. Let’s take a closer look as we continue your LSCache configuration guide.


ESI (Edge Side Includes) is a method allowing you to “punch holes” in public content, so you can fill them with content that is uncached or private. It’s helpful for a number of things, including personalized greetings and shopping cart widgets. However, it’s deactivated by default.


The Object tab’s settings give you the flexibility to control an external object cache (such as LSMCD, Redis, or Memcached) that is enabled and configured by the server admin.


Browser cache is a client-level cache for static files. When this has been switched on, static files (e.g. images) will be stored locally on a user’s computer/device when they’re requested for the first time. In the future, the content will be retrieved from this local storage until the browser cache expires. This tab’s settings control the browser cache.


This tab’s name makes it pretty obvious that only users with a little more experience should check it out. You’re unlikely to use this, though you might if you have a conflict of some sort with a different cache plugin.


LiteSpeed Cache can be utilized with WooCommerce. When you enable WooCommerce, this tab will appear. It gives you the flexibility to configure settings for caching shop content.


Additional LSCache Plugin Sections

We still have a number of other LSCache plugin sections to explore:


In the LiteSpeed Cache Dashboard, you can view the status of your LiteSpeed Cache and services at a glance. These include Low-Quality Image Placeholders, Image Optimization, Cache Crawler, Critical CSS Generation, and others. You also have options to assess your page load times and page speed score, both of which are vital to user experience.


In this section, the settings control your services usages, as well as allowing you to upgrade the plugin automatically and determine which messages should be presented on your dashboard.


With this section, you can configure your Content Delivery Network to be used with WordPress. But don’t worry if you don’t bother with a Content Delivery Network. By default, CDN support is deactivated.

Image Optimization

With LiteSpeed Cache for WordPress, you can optimize images to make them smaller and less time-consuming to transmit. You can do this via a service, and can control it in this section.

Page Optimization

You can take a number of non-cache measures to speed up your WordPress site, many of which are supported in this tab. For instance, CSS and JavaScript minification and combination, as well as HTTP/2 push, asynchronous and deferred load, etc.

Don’t know what any of this means? That’s fine. By default, they’re disabled anyway, so there’s no need to worry about them.


In this section, you’re free to optimize your WordPress database. This is useful for speeding up your site. The LiteSpeed for WordPress cache DB Optimizer makes executing a number of these tasks in your WordPress database easier.


By default, the crawler is disabled, but when it’s active, it will travel your site and refresh pages that have expired from the cache. But be aware: crawling can be a resource-intensive process, so not every hosting provider permits it. If your hosting provider allows crawling, though, it’s an effective way to ensure your cache stays fresh.


The Toolbox section has what you need if you’re looking to export your site settings, purge the cache manually, or debug issues. But the Environment Report is likely to be the most helpful thing here.

So, that’s the end of our LSCache configuration guide for newcomers! You should have the details you need to get set up quickly, efficiently, and confidently.

LiteSpeed Cache for WordPress and Plesk

To utilize the full power of LiteSpeed Cache for WordPress you need to use it with LiteSpeed web server. Plesk hosting control panel provides an opportunity to install, configure and manage LiteSpeed web server easily. To have a better idea about Litespeed on Plesk installation process please read this LiteSpeed installation and configuration guide.

Litespeed on Plesk – Installation and Configuration Guide

Guide on how to install LiteSpeed on your Plesk server
In this guide, we’ll explore both how to install LiteSpeed on Plesk and the installation of the LiteSpeed Plesk Extension on a Plesk server. This will be based on the assumption that you’re using a fully-functional Apache-Plesk setup. You can approach the installation of the LiteSpeed web server and the Plesk Extension in a number of ways, but we’ll focus on the extension first. We’ll cover how to install the LiteSpeed web server later on in the guide.

Requirements before installation

You’ll need these before you can proceed with the installation process:

  1. An operational Apache server on Plesk

  1. Your NGINX reverse proxy should be stopped, if you have one (we’ll get to this below)

  1. A PHP handler set to FastCGI — this enables the LiteSpeed web server to follow the handler settings

How to stop the Nginx Reverse Proxy Properly

With the latest version of Plesk, NGINX may be configured as a reverse proxy server positioned between Apache and the Internet. You need to stop the NGINX reverse proxy before proceeding with the LiteSpeed web server installation, so that Apache operates as the sole web server for handling live web traffic.

The LiteSpeed process will be unable to start as required if you fail to do this.

If you don’t stop the NGINX reverse proxy, you’ll see the following notification when you attempt to access the LiteSpeed extension:

“LiteSpeed is not running. Apache is running (PID = 23136)

“NGINX reverse proxy server is currently running and must be stopped. Please go to ‘Server Management > Tools & Settings > Services Management’ and stop NGINX.”

So, to stop the reverse proxy, you’ll have to start at the Plesk Admin Console and navigate to: Server Management > Tools and Settings > Server Management > Services Management > Reverse Proxy Server (NGINX) , then hit the Stop button.

Once NGINX has come to a stop, verify that Apache has been configured to run on 80/443 like this:

netstat -lnp | grep httpd or netstat -lnp | grep apache

In the event that it hasn’t been configured that way, you’ll need to execute this command — plesk repair web — to rebuild the Apache configuration file.

Installing the LiteSpeed Plesk Extension

Follow these steps to install the LiteSpeed Plesk Extension:

  1. Download the most recent Plesk extension from the LiteSpeed site
  2. Open /usr/local/psa/admin/conf/panel.ini to be edited: if this doesn’t exist yet, create it now.
  3. Add the following content before saving the file:
    1. [ext-catalog]
    2. extensionUpload = true
  4. In Plesk: go to Extensions > My Extensions . Hit the Upload Extension button, then upload the package you downloaded in the first step.

How to Install LiteSpeed Web Server

You can use two methods for installing the LiteSpeed Web Server on Plesk: either via a script or the LiteSpeed Plesk Extension. Be aware, though, that the script won’t install the extension — it only installs LiteSpeed Web Server.

Installing LiteSpeed Web Server Via Script

Generally, this is the recommended technique if this is your first time installing LiteSpeed. We’ll explore all of the options presented throughout the installation stage in depth to help you complete it as efficiently as possible.

Installation LiteSpeed is simple. The first step is to sign into the SSH server.

Next, run this command (replace your _serial_nr with your License Key):

bash <( curl ) your_serial_nr

This script will detect your environment and ensure only the necessary dependencies and installation data is downloaded from the servers. The script will ask you to answer a number of questions, depending on the environment detected, before it starts to install LiteSpeed Web Server.

Helpful Hint:

If you want to take advantage of the script via a trial license, you’ll need to switch ‘your _serial_nr’ with the word TRIAL (written exactly like this, all in capitals) in this way:

bash <( curl ) TRIAL

When you do this, you’ll request a trial license for your server automatically before LiteSpeed Web Server is installed on it. If you notice an error when you’re utilizing the Trial License, please take a look at this helpful FAQ .

When the script starts, it will recognize the installation uses Plesk. It will then present you with the following prompts to request your input:

Could not find an lsws.options file

Could not find an lsws.options file. We will ask you for your preferred settings instead, but for automated bulk provisioning, you may want to exit and create an lsws.options file. Continue Installer(Y/N) ?

Don’t worry: this is to be expected, as this is the detailed method of installation. lsws.options is for fast/automatic installation.

Press Y then Enter to continue.


Enable PHP_SUEXEC. Run PHP processes as the account owner. Available values: 0 (off), 1 (on), and 2 (user home directory only).

This option will stipulate how your server runs a PHP process — a value of “2” is advised for shared hosting servers (this is the default).

Apache port offset

Apache port offset. Run LiteSpeed in parallel with Apache. For example, if set to 1000, Apache will listen on port 80, and LiteSpeed on 1080. If set to 0, Apache and LiteSpeed will use the same port, and LiteSpeed will not automatically start after installation.

This option defines which port the LiteSpeed Web Server will bind to when you’ve installed it. You’re recommended to set the port offset to something besides 0 (such as the default value of 1000), as this will enable LiteSpeed and Apache to run simultaneously while you’re testing if LiteSpeed works properly on your server.

You can switch the port offset to 0 once the installation has been completed and you feel sure that your sites run as they should with LiteSpeed.

If you decide to set port offset to 0, LiteSpeed will begin following the installation and Apache will then come to a stop. You’ll also need to enable the Switch to LiteSpeed Automatically option (we’ll cover further down).

Admin username

Admin username. For accessing LiteSpeed WebAdmin console.

This option defines what username you’ll utilize to gain entry to the LiteSpeed WebAdmin Console. This is valuable for getting into LiteSpeed Stats or taking control of LiteSpeed behavior following installation. It’s advised that you configure this to be fully secure. The default value is admin.

Admin email address

Admin email address. Receive important server notices, such as license expiration and server core dumps.

This option establishes the email address that you want to get warnings, errors, and notices from LiteSpeed Webserver. You’re recommended to choose an email address you monitor on a regular basis, to avoid missed updates. The default value is [email protected]

Switching PHP Handlers

Automatically switch PHP handlers for users and/or subscriptions inside of Plesk. Available values: 0 (No change), 1 (Switch just for users), 2 (Switch just for subscriptions), 3 (Switch for both users and subscriptions).

This option inquires whether you intend to switch PHP handlers for users and/or subscriptions within Plesk. The default value is 0.

Switching to LiteSpeed Web Server

Switch to LiteSpeed Web Server. Automatically switches at the end of the installation if the port offset is set to 0. Available values are 1 (enable) and 0 (disable).

This option defines if the installer should close Apache down automatically and switch to LiteSpeed Web Server after it’s been installed. You should set this to 1 if you configured Apache Port Offset to 0 earlier. The default value is 0

Quick/Automated Installation

This utilizes shortcuts to ensure LiteSpeed is installed and deployed on Plesk as quickly as it can be.

In the majority of cases, it’s sufficient to run the installer script manually. You can automate the process for bulk provisioning through the following steps: create a lsws.options file at the directory you run the script command (such as /root/) or upload to your business’s internal repo instead. This will enable the installer to pick up installation options right from the file, without requesting input from users.

So, a default lsws.options file will usually resemble the following:





admin_email="[email protected]"



admin_pass is a fresh option here, and is the password you’ll use to enter your LiteSpeed WebAdmin Console. Take care to set it as a secure password for internal usage only.

You can create lsws.options and keep it on your local network for bulk provisioning, at a URL like Then, run this command:

curl -o lsws.options && bash <( curl ) your_serial_no

Important note links to your personalized lsws.options file, which your servers should be able to access.

lsws.options is the lsws.options file’s location. It’s fine to leave it like this when the installer is being run from the directory that the lsws.options file is too.

your_serial_no is the LiteSpeed Web Server license key. If you want to request a Trial License, you can use TRIAL too, but if you encounter an error when utilizing the Trial license, check out the FAQ.

Install LiteSpeed Web Server from the LiteSpeed Plesk Extension

You’ll be able to access the LiteSpeed Plesk Extension via Server Management > Extensions > LiteSpeed Extension.

Click on Install LiteSpeed Web Server.

Once you’ve read the comprehensive License Agreement, tick the I agree box. You’ll also have to enter your license’s serial number or request a trial license instead.

Scroll down the page a little more and you’ll find Installation Options and WebAdmin Console Login .

For the Installation Options section, the default values should be fine, but it’s advised that you set a non-zero Port Offset when installing for the first time (such as 1000).

For shared hosting, **Enable PHP SuEXEC** is recommended and implemented by default. You’ll only need to input a password in the WebAdmin Console Login section, though you’re advised to utilize a different username than the default to maintain effective security.

When you feel ready to proceed, click on the Install button below the Web Admin Console Login section.

You’ll be presented with a message to confirm that LiteSpeed has been “installed successfully” . This will include details such as:

  • platform detected

  • latest stable version

  • download directory created

At the bottom of the page, hit Okay and start LiteSpeed Web Server by clicking on the Restart LiteSpeed button.

If this process completes successfully, you should see a message on your LiteSpeed Extension page: this will inform you that LiteSpeed and Apache are operating on separate ports. Apache will run on the regular port 80 and LiteSpeed on 1080 (assuming your port offset is 1000).

You don’t need to test LiteSpeed on an offset port for staging servers or test environments, and LiteSpeed is unable to be tested on an offset port for certain applications (e.g. Magento, WordPress). In this case, you can just “Switch to LiteSpeed” from the extension GUI or command line for testing (as so):

/usr/local/lsws/admin/misc/ lsws

Running Testing with a Port Offset

The major advantage of the port offset is that you’re able to run both LiteSpeed Web Server and Apache at the same time. So, you can test hosting your websites on LiteSpeed Web Server to ensure they work before you switch off Apache.

For example, we have set the port offset to 1000. Sites could be tested on ports 1080 and 1443 for HTTP and SSL requests (respectively).

When you feel satisfied that your websites run properly with Litespeed Web Server, you’ll be ready to switch to LiteSpeed Web Server as your primary server.

Switching to LiteSpeed

First, under the Switch between Apache and LiteSpeed heading, click on Switch to LiteSpeed to stop Apache and make LiteSpeed Web Server your main server ports: 80 and 443.

LiteSpeed will be running as your primary web server. You’ll be presented with a message stating that “LiteSpeed is running” and “Apache is not running”. It will also tell you that you “Switched to LiteSpeed successfully”.

Switch between LiteSpeed and Apache

You should switch between LiteSpeed and Apache via the LiteSpeed Extension.

Also, you can do this by running the switching script from this command line:

/usr/local/lsws/admin/misc/ apache

/usr/local/lsws/admin/misc/ lsws

LiteSpeed on Plesk: Configuration Process


Straight out of the box, LiteSpeed works with Plesk PHP. The only step you need to take is to set PHP handler to FastCGI, to prevent mismatched PHP settings .

By default, LiteSpeed will honor Plesk’s PHP settings with no need for further configuration, but extra handlers will be needed if CloudLinux PHP Selector is enabled and you would rather use that as your PHP manager instead. We’ll cover this in more detail further on in this guide.

Disabling PHP Override

With LiteSpeed Web Server, you can disable the PHP override in .htaccess.

php_value and php_flag may be utilized in Apache configuration, or .htaccess to override php.ini settings. But they’re only supported by Apache’s mod_php handler, which is deprecated in the majority of the control panel systems after being replaced by php-fpm, LSPHP or fastcgi.

This means Apache should return an error if you place php_value or php_flag in .htaccess. You can find details in Plesk’s documentation .

You may see one of these errors:

500 internal server error

503 Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration.

The following error can be found in the domain error log in Domains > > Logs:

/var/www/vhosts/ Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

/var/www/vhosts/ Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

/var/www/vhosts/ RewriteRule: bad flag delimiters

/var/www/vhosts/ Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration.

LiteSpeed Web Server utilizes LSPHP, supporting php_value and php_flag usage in .htaccess. LiteSpeed Web Server will not return a 500 error when you use these, as it tolerates these PHP overrides more than Apache does.

In certain situations, you may opt to disable such PHP overrides in .htaccess for LiteSpeed too. To achieve this, you can use a dedicated Apache directive DisablePhpOverride htaccess (which may be utilized at the server level httpd.conf.).

Let’s look at an example: on Plesk, make a file named DisablePhpOverrideLiteSpeed.conf in the following directory (depending on your system):



Debian Ubuntu:

This DisablePhpOverrideLiteSpeed.conf file should include this:

DisablePhpOverride htaccess

Customized Configuration

PHP is auto detected as of LiteSpeed Web Server v5.3. There’s no longer a need for manual PHP external app configuration, and the preferred PHP manager is Plesk.

But if you would prefer to have a customized configuration for a specific PHP version, you might be required to create and configure the external app manually. From LiteSpeed Web Server Admin Console, you can create lsphpXX (such as lsphp70, lsphp71, lsphp72) one at a time.

Just adjust the Name, Address and Command settings to align with the relevant PHP version. If you would prefer to use the command line rather than the GUI tool, though, you can edit the LiteSpeed Web Server configuration file instead. This is typically located at /usr/local/lsws/conf/httpd_config.xml. 

CloudLinux PHP Selector

When you enable CloudLinux PHP Selection alongside Plesk PHP settings, you may be uncertain which PHP Selector is actually in effect. LiteSpeed automatically honors Plesk’s PHP selection straight out of the box, with no additional configuration necessary. So, you’ll have to make a few adjustments if you would like to use CloudLinux PHP Selector:

  • Set up an extra handler for LiteSpeed: this will force Plesk PHP to point to CloudLinux for non alt-phpxx versions.

  • Select a non alt-php version in Plesk’s PHP settings.

Together, these actions will make the CloudLinux PHP Selector come into effect.

Configure Extra Handler

Go to LSWS Web Admin Console > Server > PHP > Add PHP Handlers and follow these instructions:

  • Handler ID: php

  • Command : /var/www/cgi-bin/cgi_wrapper/cloudlinux_wrapper

  • Handled Suffixes: php, php54, php55, php56, php70, php71, php72, php73, php74

These settings will cause those Plesk PHP versions listed to utilize the CloudLinux PHP selector.

You can edit LiteSpeed’s configuration directly if you would rather take this route:

vi /usr/local/lsws/conf/httpd_config.xml

Enter the following in ... tags:



    php, php54, php55, php56, php70, php71, php72, php73, php74

Select Plesk PHP

After the handler has been created, go to Plesk’s PHP settings and pick any PHP version (the PHP support dropdown) that’s not one of the alt-php versions (i.e. one of those listed in the PHP handler that has just been created). This will make sure that CloudLinux PHP selection is utilized.

LiteSpeed Cache for WordPress

The LiteSpeed Cache plugin can be mass installed in each WordPress installation on your server using the LiteSpeed Plesk Extension. Once you’ve installed the LiteSpeed Plesk Extension, you could see a No Cache Management data file found message.

Set Cache Root

Click Manage Cache Installations , and then Set Missing Cache Roots in the Cache Root Setup section.

Scan and Enable

Once you have set up the cache root successfully, navigate back to the extension main page. Then, click the Manage Cache Installations option again.

Next, you will need to scan for WordPress installations across the server and install LSCache for WordPress (LSCWP) on them. First, though, you’ll have to select the LSCache plugin version you want to install. Typically, it’s recommended that you pick the latest version.

This is a fairly simple process thanks to the user-friendly layout. Once you begin scanning, this could take some time based on the number of sites you have.

When the scan ends, you’ll get to manage those WordPress sites found. You can use the Discover New button in future: this will help to save time as only scans for sites that haven’t been discovered yet.

Now you’ll be able to activate the LiteSpeed Cache Plugin for WordPress individually or use bulk activation for a number of websites instead. You should notice a green light symbol in the Cache Status column when LSCWP has been activated successfully.

If you want to verify a site is cached, take a look at the x-litespeed-cache:hit response header, which indicates that the caching is running properly.


QUIC connections use UDP port 443. You need to make sure it’s not being blocked by your firewall.

HTTP/2 and HTTP/3 through Apache Config

You may enable and disable a number of protocols (such as HTTP/3 and HTTP/2) in httpd.conf, by utilizing the SpdyEnabled directive, as so:

    SpdyEnabled http3

Alternative parameters that are valid include:

  • spdy2

  • spdy3

  • http2

  • off

By default, all protocols are enabled, which means there’s no requirement for a SpdyEnabled directive if you want to use all SPDY, HTTP/2 and HTTP/3 protocols.

Helpful Hint

When using this directive to enable protocols, anything you don’t select will actually be disabled. So, for instance, SpdyEnabled http2 enables HTTP/2 while disabling SPDY and HTTP/3. Take care not to accidentally disable one or more protocols you need to use.


To strengthen Plesk’s security features, enable TLS 1.3 and disable weak cipher suites. TLS1.0, TLS1.1, TLS1.2 will be enabled by Plesk configuration by default, and this guide will demonstrate how to enable TLS 1.3.

This guide is created and tested on Plesk 17.8 as well as Centos 7.5. Configuration files must be in /etc/apache2/mods-available/ssl.conf for Debian/Ubuntu Plesk.

Remember: as with any changes to Apache config files, you’ll have to restart the server when making the below adjustments. Use the following command with restarts:

systemctl restart lsws

Enabling TLS1.3

Edit the file /etc/httpd/conf.d/ssl.conf.

Locate this line and comment out (using #):

SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2

SSLCipherSuite HIGH:!aNULL:!MD5

Replace this with the following:

SSLProtocol TLSv1.1 TLSv1.2 TLSv1.3

SSLCipherSuite HIGH:!aNULL:!MD5

This enables TLS1.1, TLS1.2 and TLS1.3.

Want to disable TLS1.1 too? Change the line to the following:

SSLProtocol TLSv1.2 TLSv1.3

Disabling Weak Cipher Suites (this is optional)

Plesk also includes a number of weak cipher suites by default, but you can disable them with:

SSLCipherSuite HIGH:!aNULL:!MD5

Then, replace it with the following:



Please be aware, though, this can lead to CPU load. Testing is performed through SSL Labs.

WebAdmin Console

The LiteSpeed WebAdmin Console utilizes port 7088 rather than 7080 for Plesk. Take a look at your firewall to determine if port 7088 is enabled, and then you will likely have access to WebAdmin via https://SERVER_IP:7088.

Plesk Login Page

It’s possible to set up a Plesk login page with no need for a URL port number — for instance, https://IP-or-domain:8430 may become

Make a vhost in Plesk then put this rewrite rule in its .htaccess:

RewriteRule ^(.*)$$1 [P,L]

This brings our insightful guide on how to install LiteSpeed on Plesk to a close. Thank you for reading — we hope it helps you get off to a great start!