//Web Panel

Switch Apache to LiteSpeed Enterprise on cPanel in 15 Minutes

Switch Apache to LiteSpeed Enterprise on cPanel in under 15 minutes with this step-by-step guide for AlmaLinux 8.

5 min read
Switch Apache to LiteSpeed Enterprise on cPanel in 15 Minutes

Running a high‑traffic website or a resource‑intensive web app on a shared‑hosting control panel usually means you are using Apache as the default web server. Apache is reliable, but many cPanel users find that LiteSpeed Enterprise offers better concurrency, lower CPU usage, and built‑in caching with minimal configuration changes. Swapping Apache for LiteSpeed on a cPanel server can be completed in under 15 minutes.

Why Switch to LiteSpeed Enterprise?

  • Performance: LiteSpeed’s event‑driven architecture handles thousands of simultaneous connections while using far less memory than Apache’s process‑based model.
  • Compatibility: It reads Apache’s httpd.conf and .htaccess files, so most existing sites work without modification.
  • Built‑in caching: LSCache accelerates dynamic CMS platforms (WordPress, Joomla, etc.) out of the box.
  • cPanel integration: The LiteSpeed plugin adds a “LiteSpeed Web Server” section to WHM, letting you manage settings from the familiar interface.

Prerequisites

  1. A server running cPanel & WHM. The steps below assume AlmaLinux 8 (or Rocky 8 / RHEL 8), the current supported OS for cPanel.
  2. Root SSH access.
  3. A valid LiteSpeed Enterprise license (or a trial key). Obtain a trial from the LiteSpeed website and apply it later in WHM.

Step 1 – Prepare the System

Log in via SSH as root, update the package index, and install the tools needed for the installer.

# dnf update -y
# dnf install -y wget curl

What the commands do:

  • dnf update -y – Downloads and installs the latest security patches and package updates.
  • dnf install -y wget curl – Installs wget and curl, which are required to fetch and verify the LiteSpeed installer.

Step 2 – Download and Run the LiteSpeed Installer

LiteSpeed provides a script that handles download, installation, and initial configuration.

# wget -O lsws_install.sh https://www.litespeedtech.com/packages/lsws/install.sh
# chmod +x lsws_install.sh
# ./lsws_install.sh

Explanation:

  • wget -O lsws_install.sh … – Retrieves the installer script and saves it as lsws_install.sh.
  • chmod +x lsws_install.sh – Makes the script executable.
  • ./lsws_install.sh – Starts the interactive installer.

During the prompts, select:

  • Installation type: Enterprise (you’ll enter the license key later).
  • Web server ports: Keep the defaults 80 (HTTP) and 443 (HTTPS).
  • Admin password: Set a strong password for the LiteSpeed admin console.

Step 3 – Install the cPanel/WHM Plugin

After the core binaries are in place, install the plugin that adds LiteSpeed management to WHM.

# /usr/local/lsws/admin/misc/cpanel/lsws_whm_plugin_install.sh

The script:

  • Copies plugin files into /usr/local/cpanel.
  • Registers a “LiteSpeed Web Server” service in WHM.
  • Creates a cron job to keep the license status updated.

Step 4 – Activate Your LiteSpeed Enterprise License

Log in to WHM (https://your‑server‑ip:2087) with root credentials. In the left navigation pane choose LiteSpeed Web Server → License Management.

  1. Click Enter License Key.
  2. Paste the license key you received from LiteSpeed and click Save.
  3. The plugin validates the key with the LiteSpeed licensing server and displays the expiration date.

If validation fails, ensure the server can reach license.litespeedtech.com on port 443 and adjust firewall rules if necessary.

Step 5 – Switch Apache to LiteSpeed

cPanel’s plugin provides a one‑click switch. In WHM go to LiteSpeed Web Server → Switch to LiteSpeed and confirm.

Behind the scenes the plugin:

  • Stops Apache (systemctl stop httpd).
  • Starts LiteSpeed (/usr/local/lsws/bin/lswsctrl start).
  • Updates cPanel’s service map so future restarts use LiteSpeed.

Verify the change:

# systemctl status lsws
# systemctl status httpd

You should see LiteSpeed active (running) and Apache inactive (dead). Visiting a hosted domain will display the default LiteSpeed “Welcome” page if no virtual host files exist, confirming the server is responding.

Step 6 – Fine‑Tune LiteSpeed Settings (Optional)

The default configuration works for most sites, but you may want to adjust a few options.

  • Worker Processes: WHM → LiteSpeed → Server Configuration → General Settings → “Number of Workers”. Set this to the number of CPU cores (e.g., 4 for a 4‑core VM) to match LiteSpeed’s event loops to your hardware.
  • Cache: Enable LSCache for supported CMS platforms via the “Cache” tab. For WordPress, install the “LiteSpeed Cache” plugin from the WordPress admin dashboard.
  • Security Headers: Use the “Rewrite Rules” section to add headers such as Header set X‑Content‑Type‑Options nosniff without editing Apache configs.

All changes made through the WHM interface are written to /usr/local/lsws/conf/httpd_config.conf. After any adjustment, click “Graceful Restart” in the LiteSpeed WHM module to apply the new settings without dropping connections.

Step 7 – Verify Site Functionality

Test a few representative sites before finishing:

  1. Open a browser and load a static HTML site. Confirm the page loads quickly and the response header includes Server: LiteSpeed.
  2. Visit a WordPress site and check that the LSCache plugin reports cache hits.
  3. Run curl -I https://yourdomain.com from the server and verify a 200 OK status.

If any site shows errors, review its .htaccess for Apache‑specific directives that LiteSpeed does not support (e.g., certain RewriteEngine flags). Most issues can be resolved by consulting the LiteSpeed documentation or adjusting the offending lines.

Conclusion

Replacing Apache with LiteSpeed Enterprise on a cPanel server is straightforward: update the OS, run the official installer, add the cPanel plugin, apply your license, and switch services—all in under 15 minutes. The result is a more efficient web server that leverages existing Apache configurations while delivering lower CPU load and built‑in caching. After the switch, you continue managing domains, email, and DNS through WHM as before, but with the performance benefits of LiteSpeed.

lite speedcpanelapacheweb serverlinuxserver administrationperformancelsws

Try it on your own server

Follow along on a Cloud VPS with full root access, or read the step-by-step knowledge base guides.