---
title: "LiteSpeed"
source: "https://docs.nexcess.com/hosting/server-administration/linux/litespeed/"
description: "LiteSpeed Web Server guide: Learn benefits, features, licensing, installation (cPanel/InterWorx), PHP config & management for faster sites."
vertical: "Hosting"
date: "2025-05-30"
last_modified: "2026-07-27"
---

# LiteSpeed

This guide provides comprehensive information on LiteSpeed Web Server (LSWS), including its benefits, how to order and manage licenses, installation procedures, configuration, troubleshooting, and more.

## What is LiteSpeed Web Server?

LiteSpeed Web Server is a high-performance, Apache-interchangeable HTTP server. It’s a popular alternative to Apache, often used to accelerate websites and improve server efficiency. On cPanel servers, LiteSpeed integrates with EasyApache, making it a seamless upgrade.

**Key Benefits of LiteSpeed:**

- **Performance:** LiteSpeed is renowned for its speed, typically performing significantly faster than Apache, even Apache with configurations like Event MPM and PHP-FPM. It can handle more traffic with fewer resources.
- **Ease of Use:** Once installed, LiteSpeed generally requires minimal ongoing management to maintain excellent performance. If you want your site to load quickly without extensive manual tuning, LiteSpeed is an excellent choice.
- **Compatibility:** It’s compatible with most major Content Management Systems (CMS) like WordPress, Joomla, and Drupal. It fully supports Apache’s .htaccess files and mod\_rewrite rules.
- **Integrated Caching:** LiteSpeed comes with powerful caching solutions, including LSCache plugins for popular CMS platforms, which can dramatically improve site load times.
- **Control Panel Integration:** LiteSpeed is fully integrated into WHM/cPanel and Plesk, simplifying management tasks.

## Liquid Web support for LiteSpeed

- **Fully Supported Licenses:** If you purchase your LiteSpeed license directly from Liquid Web, it is **fully supported** by our team. We will assist you with installation, configuration, troubleshooting, and any other needs related to LiteSpeed. If an issue requires direct intervention from LiteSpeed Technologies, we will contact them on your behalf.

## Key features of LiteSpeed Web Server

LiteSpeed offers a rich set of features designed for performance, security, and scalability:

- **HTTP/2 and HTTP/3 (QUIC) Support:** Delivers faster content loading and improved security (LiteSpeed Version 5.0 and newer for HTTP/2).
- **.htaccess Caching:** Optimizes the processing of .htaccess rules.
- **Apache Compatibility:** Full support for Apache’s mod\_rewrite and mod\_include.
- **Security:**
    - Support for ModSecurity (Enterprise Edition).
    - WordPress Brute-Force Protection.
    - Built-in Anti-DDoS capabilities.
- **Caching Solutions:**
    - LSMCD (LiteSpeed Memcached) for object caching.
    - CSS/JS Minification and Optimization.
    - LiteSpeed Cache plugins for WordPress, Magento, Joomla, Drupal, and more.
- **PHP Performance:** Advanced PHP processing with LSAPI for optimal speed.
- **Real-time Monitoring:** Provides statistics and insights into server performance.

For a complete list of features, please visit the [LiteSpeed Technologies features page](http://www.litespeedtech.com/products/LiteSpeed-web-server/features).

## LiteSpeed licensing options with Liquid Web

Liquid Web offers several monthly leased LiteSpeed license tiers. We do not offer free, lite, or owned licenses. If you require these, you would need to obtain them directly from LiteSpeed.

When choosing a license, LiteSpeed generally recommends selecting a license with enough worker processes to utilize roughly 25% of your server’s available CPU cores. All licenses we offer support unlimited domains and RAM.

*Note: The number of CPU cores specified in the LiteSpeed license **does not need** to match the total number of cores on your server. If your needs change, you can contact us to upgrade or downgrade your license.*

For detailed guidance on choosing the right license, refer to LiteSpeed’s official documentation: [How to Choose a License](https://docs.litespeedtech.com/licenses/products/lsws/#how-to-choose-a-license).

## LiteMage for Magento 2

LiteMage is a Magento 2 caching extension that works with your LiteSpeed Web Server license to significantly accelerate your Magento store. LiteMage requires an active LiteSpeed license leased through Liquid Web.

| Cache Add-on | Supported Applications | LSCache Objects | Magento Objects | Availability | Price (Per Month) |
|---|---|---|---|---|---|
| LSCache | WordPress, Joomla, Drupal | Unlimited | 0 | Included with all LW LiteSpeed licenses | Included with License |
| LiteMage Starter | Everything LSCache supports + Magento | Included | 1,500 | All LW LiteSpeed licenses | $20 + LS License |
| LiteMage Standard | Everything LSCache supports + Magento | Included | 25,000 | All LW LiteSpeed licenses | $40 + LS License |
| LiteMage Unlimited | Everything LSCache supports + Magento | Included | Unlimited | All LW LiteSpeed licenses | $100 + LS License |

## Ordering LiteSpeed

You can order a LiteSpeed license for your Liquid Web server. Log into your portal.nexcess.com account and then use this link: [My Liquid Web Marketplace](https://portal.nexcess.com/shop/config/LITESPEEDLIC).

- **New Dedicated Servers:** When configuring a new traditional dedicated server, you can select LiteSpeed from the Web Server dropdown menu instead of Apache.
- **Existing Servers / Cloud Servers / LiteMage:** For existing servers, Cloud VPS, Cloud Dedicated servers, or if you need LiteMage, please use the My Liquid Web Marketplace link above.

Once your order is placed through the Marketplace, our support team will provision the license and can assist with the installation. You will receive a serial number required for the installation.

## Moving a LiteSpeed license

If you need to move your Liquid Web-leased LiteSpeed license from one of your servers to another, please contact our support team. We will assist you in releasing the license from the old IP address and preparing it for the new server.

## Cancelling a LiteSpeed license

To cancel a LiteSpeed license leased through Liquid Web, please contact our support or billing team. We will process the cancellation with LiteSpeed Technologies and update your account accordingly.

## Installation

**Before you begin:**

1. **Order Your License:** Ensure you have ordered your LiteSpeed license through Liquid Web and have received your serial number.
2. **Note Current Server Configuration (Important for Rollback if Needed):**  
    Before installing LiteSpeed and if this on a cPanel server, it’s a good practice to log your server’s current configuration. You can do this by running the following command as root and saving the output:  
    `bash printf "`cat /etc/redhat-release`n `uname -a`n `date`n `/usr/local/cpanel/bin/rebuild_phpconf --current`n" > /root/pre-lsws-check.log`
3. **Firewall Configuration (CentOS 7 / AlmaLinux with firewalld):**  
    If your server uses `firewalld`, open the necessary ports:  
    `bash firewall-cmd --permanent --zone=public --add-port=7080/tcp # LiteSpeed WebAdmin Console firewall-cmd --permanent --zone=public --add-port=8088/tcp # LiteSpeed Test Port (if using offset) firewall-cmd --reload`

### WHM/cPanel installation

This is the recommended method for servers with WHM/cPanel. The script installs LiteSpeed and the WHM plugin.

1. SSH into your server as the root user.
2. Run the installation script, replacing `$LSWS_SERIAL` with your actual LiteSpeed serial number: `LSWS_SERIAL="YOUR_SERIAL_NUMBER_HERE" bash <( curl [https://get.litespeed.sh](https://get.litespeed.sh) ) $LSWS_SERIAL`
    - During the installation, you’ll be prompted for: 
        - **LiteSpeed target installation directory:** The default (`/usr/local/lsws`) is usually fine.
        - **Port Offset:**
            - Set to `0` to replace Apache immediately. LiteSpeed will use ports 80 and 443.
            - Set to a non-zero value (e.g., `2000`) to run LiteSpeed on alternate ports (e.g., `2080` for HTTP, `2443` for HTTPS) for testing before switching.
        - **Enable PHP SuEXEC:** It’s generally recommended to enable this unless you have a specific reason not to.
        - **Administrator’s email address:** Use your primary contact email.
        - **Username and password for LWSW WebAdmin Console:** Choose a strong password and store it securely.
3. **Verify Installation:**
    - Log in to WHM.
    - Navigate to **Plugins » LiteSpeed Web Server**.
    - From here, you can manage LiteSpeed, switch between LiteSpeed and Apache, and access the LiteSpeed WebAdmin Console.
4. **Activate License with Billing:** After installation, please contact our support team to confirm that your license has been fully activated in our billing system.

For more details, refer to the [official LiteSpeed cPanel installation guide](https://docs.litespeedtech.com/lsws/cpanel/#installation).

### InterWorx installation

LiteSpeed can be installed on InterWorx servers, but it requires more manual configuration steps compared to cPanel.

1. **Initial Software Installation:**  
    SSH into your server as root and run (replace `$LSWS_SERIAL` with your serial number): `LSWS_SERIAL="YOUR_SERIAL_NUMBER_HERE" bash <( curl [https://get.litespeed.sh](https://get.litespeed.sh) ) $LSWS_SERIAL`
    - When prompted, select **InterWorx** as the control panel.
    - It’s recommended to set a **port offset** other than `0` (conflicts with Apache) or `2000` (conflicts with InterWorx panel) for initial testing. For example, use `3000`. This means LiteSpeed will initially run on ports `3080` (HTTP) and `3443` (HTTPS). You can test sites using `http://yourdomain.com:3080`.
2. **Enable and Start LiteSpeed (if not started during install):** `systemctl enable --now lsws` This makes the LiteSpeed WebAdmin console accessible at `http://YOUR_SERVER_IP:7080`.
3. **InterWorx Additional PHP Steps:**
    - **Add LiteSpeed PHP Repository:**
        - For CentOS 7:  
            `bash rpm -ivh [http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm](http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm)`
        - For AlmaLinux 8/Rocky Linux 8/RHEL 8:  
            `bash rpm -ivh [http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm](http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm)`
    - **Install LiteSpeed PHP (lsphp) versions:**  
        Install the desired `lsphp` versions and common extensions. The following command generates a list of available `lsphp` packages; you can then copy and run the `yum install` command with the packages you need: `yum -q list lsphp* | awk '{print $1}' | grep -Ev '(pecl|debuginfo|src|Available|Installed)' | xargs echo yum install` Example: `yum install lsphp74 lsphp74-common lsphp74-mysqlnd lsphp74-gd lsphp74-xml lsphp74-mbstring lsphp74-json` (Install all desired versions like lsphp80, lsphp81 etc.)
    - **Configure PHP Handlers in LiteSpeed WebAdmin:**
        1. Log into the LiteSpeed WebAdmin console (`http://YOUR_SERVER_IP:7080`).
        2. Go to **Configuration » Server » PHP**.
        3. In the **PHP Handlers** section, click **Add**.
        4. Fill in the details: 
            - **Handler ID:** A descriptive name (e.g., `lsphp80` for PHP 8.0).
            - **Handler Type:** LiteSpeed SAPI
            - **Command:** Path to the `lsphp` executable (e.g., `/usr/local/lsws/lsphp80/bin/lsphp`).
            - **Handled Suffixes:** `php` (or others like `php80` if you want to specify versions via suffix).
        5. Save the handler. Repeat for each PHP version you installed.
        6. Gracefully restart LiteSpeed from the WebAdmin console (usually a “Graceful Restart” link at the top).
4. **Set PHP Version per Site:**  
    By default, sites will use the highest configured version of LSPHP. To specify a PHP version for a particular site, create or modify the `.htaccess` file in the site’s document root: `AddHandler application/x-httpd-{Handler ID} .{Handled Suffixes}` Example for `lsphp80` handler for `.php` files: `AddHandler application/x-httpd-lsphp80 .php` Wrap LiteSpeed-specific settings in an `<IfModule LiteSpeed>` block to avoid issues if you switch back to Apache: `<IfModule LiteSpeed> AddHandler application/x-httpd-lsphp80 .php </IfModule>`
5. **Testing:**  
    Thoroughly test your websites using the offset port (e.g., `http://yourdomain.com:3080`). Ensure all PHP versions and site functionalities work as expected. Open any custom test ports in your firewall if necessary.
6. **Enable LiteSpeed Plugin in NodeWorx:**  
    Go to **NodeWorx » Plugins** and enable the LiteSpeed plugin (click the pencil/edit icon).
7. **Go Live:**  
    When you are satisfied with testing: 
    1. Stop and disable Apache:  
        `bash systemctl stop httpd systemctl disable httpd`
    2. In the LiteSpeed WebAdmin console, change the **Port Offset** to `0`.
    3. Perform a graceful restart of LiteSpeed. LiteSpeed will now serve sites on the standard ports 80 and 443.

**Note for InterWorx:** Setting up LiteSpeed on InterWorx involves more manual steps than on cPanel. If extensive, automatic configuration is crucial, consider migrating to a cPanel environment.

## Configuring PHP

- **For EasyApache 4 (EA4) on cPanel:** The LiteSpeed WHM plugin generally handles PHP configuration automatically. It will detect your existing PHP versions and set up corresponding LSPHP handlers.
- **For EasyApache 3 (EA3) on cPanel (Legacy):**
    1. In the LiteSpeed WHM Plugin, click “Build Matching LSPHP.” This process can take some time.
    2. Once complete, click “Restart LiteSpeed.”

### Using Local php.ini files

To allow individual accounts or virtual hosts to use their own `php.ini` files with LiteSpeed:

1. Log in to LiteSpeed’s WebAdmin Console (`http://YOUR_SERVER_IP:7080`).
2. Go to **Configuration » Server » External App**.
3. Click **Edit** for the relevant LSPHP handler (e.g., `lsphp`).
4. In the **Environment** section, add the following line: `PHP_INI_SCAN_DIR=:$VH_ROOT/public_html`
    - `$VH_ROOT` typically refers to the user’s document root or a similar path. This allows a `php.ini` file in the `public_html` (or specified) directory to be loaded.
    - The leading colon `:` ensures that global PHP INI files are still scanned, and the local `php.ini` directives are appended or override global settings.
5. Save the changes and perform a graceful restart of LiteSpeed.

## Post-Installation recommendations

### Use mod\_remoteip instead of mod\_cloudflare

If you are using Cloudflare or another reverse proxy, ensure that your websites log the correct visitor IP addresses instead of the proxy’s IP. LiteSpeed has a built-in way to handle this:

1. Log in to the LiteSpeed WebAdmin Console (`http://YOUR_SERVER_IP:7080`).
2. Go to **Configuration » Server » General Settings**.
3. Find the option **Use Client IP in Header**.
4. Set it to **Trusted IP Only** or **Yes**. 
    - **Trusted IP Only** is generally recommended. You will then need to add Cloudflare’s (or your proxy’s) IP addresses to **Configuration » Server » Security » Allowed List**. You can find Cloudflare’s current IP ranges [here](https://www.cloudflare.com/ips/).
5. Save the settings and perform a graceful restart of LiteSpeed.

### Updating LiteSpeed

To update LiteSpeed to the latest stable version via the command line:  
`/usr/local/lsws/admin/misc/lsup.sh`
