Panellicense

Install LiteSpeed Web Server on a cPanel box (replace Apache)

Swap Apache for LiteSpeed Web Server on a running cPanel server in about 20 minutes — keep every .htaccess rule, every mod_security policy, and every PHP handler intact.

6 min readUpdated 2026-05-15litespeed · lsws · cpanel · apache
schema: HowToschema: FAQPageschema: BreadcrumbList

LiteSpeed Web Server (LSWS) drops into a cPanel box as a direct Apache replacement. Same config files, same .htaccess semantics, same PHP handlers — but event-driven request handling and built-in LSCache. On a 200-account shared box, the switch typically halves CPU at peak and cuts TTFB by 40-60% on uncached WordPress traffic.

This guide installs the LiteSpeed WHM plugin, activates a licence, and switches the live HTTP traffic over. End-to-end on a 4-vCPU server it takes 15-20 minutes, including the warmup recompile. Apache binaries stay on disk, so rollback is one click.

Before you start

You need three things in place:

  • A working cPanel install. If you're standing up a new box, run through the cPanel VPS install guide first.
  • A LiteSpeed Web Server licence keyed to the server's primary IP. The WHM plugin will pull it automatically from the licence server, but the IP must match what's on file. Activate an LSWS licence before you run the installer.
  • Root SSH. The plugin installer is a shell script, not a WHM upload.

Step 1 — Install the WHM plugin

SSH in as root and pull the installer:

cd /usr/src
wget https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh
sh lsws_whm_plugin_install.sh

The script registers the plugin in WHM, drops the LSWS binary in /usr/local/lsws/, and mirrors Apache's httpd.conf into LSWS native format. It does not start LSWS or change which server is serving traffic. Apache is still in front.

Confirm the plugin is registered:

ls /var/cpanel/whm/themes/x/plugins/ | grep -i litespeed

Step 2 — Activate the licence

Open WHM → PluginsLiteSpeed Web Server. The first screen shows licence status. If you bought through us, the licence is already keyed to the server IP and will pull automatically — click Activate License.

If activation fails with "Trial license is locked to a different IP", the IP on file doesn't match. Update the IP in your panellicense dashboard, wait 60 seconds for the licence server to propagate, and retry. Don't reinstall — the plugin caches the trial state and you'll end up debugging the wrong layer.

For a paid licence, expect the activation page to show License Type: Web Server Enterprise and the account cap matching your tier (typically Unlimited for shared hosting).

Step 3 — Build matching PHP handlers

LSWS reads Apache's handler configuration but builds its own PHP binaries via lsphp. From the plugin home:

  1. Click LSWS ConfigurationGeneralPHP Suexec Level → set to 2 (full suEXEC).
  2. Click Build LSPHP and tick every PHP version you serve under EasyApache. Builds run in parallel and take 8-12 minutes total on a 4-vCPU box.
  3. Wait for the green "Build successful" status on every version before moving on. A half-built lsphp will 500 every PHP request after cutover.

The handler map is auto-generated — every account keeps the PHP version it was on under Apache. You don't need to re-assign per-account versions.

Step 4 — Switch traffic to LiteSpeed

Back on the plugin home, click Switch to LiteSpeed. The plugin:

  1. Stops the Apache httpd process
  2. Starts lshttpd on the same ports (80, 443, 2082, 2083, 2086, 2087, 2095, 2096)
  3. Updates chkserv.d so cPanel's service monitor watches lshttpd, not httpd
  4. Restarts cpsrvd

Total downtime is 3-8 seconds per HTTP port. Browser sessions reconnect transparently; long uploads die.

Verify LSWS is serving:

curl -I https://yourdomain.example/ | grep -i server

You should see Server: LiteSpeed. If you still see Server: Apache, the switch didn't take — check /usr/local/lsws/logs/error.log and re-run the switch from WHM.

Step 5 — Verify .htaccess and mod_security

LSWS reads .htaccess in place and applies it without a reload. To confirm nothing broke during the migration:

# Pick an account with non-trivial .htaccess
cd /home/exampleuser/public_html
curl -I https://exampleuser.yourserver.example/ \
  -H "User-Agent: BadBot/1.0"

If your .htaccess blocks BadBot/1.0, you should see a 403. If you get 200, the rules aren't being read — check the LSWS access log to confirm the request hit LSWS, not a cached upstream.

For ModSecurity, the plugin imports cPanel's rule set automatically. Confirm under WHM → ModSecurity Tools that rules are still active. The rule engine path changes from mod_security2.so to LSWS's internal engine, but the rule files themselves are unchanged.

LSCache is the whole reason most operators switch. For per-account WordPress acceleration, see enable LSCache for WordPress on a cPanel server — it's a 5-minute setup per account and you'll see the cache hit ratio in WHM under the LSWS plugin within a few hours.

Rolling back

If something breaks and you need Apache back, click Switch to Apache in the plugin. LSWS stops, Apache restarts, traffic resumes. Don't uninstall LSWS — leave it in place so you can re-run the switch once you've fixed whatever broke.

Common reasons to roll back temporarily:

  • A custom Apache module (e.g. mod_pagespeed, mod_evasive) that has no LSWS equivalent. Most have native LSWS replacements; check the LiteSpeed module compatibility list before assuming.
  • A custom EasyApache profile that referenced an Apache-only build flag.
  • An account using mod_rewrite rules with non-standard backreferences. Rare, but shows up in old e-commerce installs.
Do I need to reinstall WordPress sites after switching to LiteSpeed?+
No. LSWS reads the same .htaccess and serves the same document root. Existing sites work unchanged. You only need to install the LiteSpeed Cache plugin if you want LSCache acceleration.
Does LSWS work with CageFS and CloudLinux?+
Yes — LSWS is the recommended web server for CloudLinux. The lsphp binaries are cage-aware and respect LVE limits automatically. See the CloudLinux installation guide for the integration steps.
Will EasyApache still work after I install LSWS?+
Yes. EasyApache rebuilds Apache binaries (which stay on disk for rollback), and the LSWS plugin re-reads the resulting handler config on each rebuild. You don't need to disable EasyApache.
Can I run LSWS without buying LSCache separately?+
LSCache is included in every LSWS licence — there is no separate cache licence. The plugin you install per WordPress site is free; it talks to the cache engine built into LSWS.
Does the LSWS licence cover unlimited cPanel accounts?+
The Web Server Enterprise tier sold for cPanel hosting is unlimited per server. Workers (CPU cores) are the variable — 1-worker, 2-worker, 4-worker, 8-worker, and Unlimited tiers exist.

Next steps

Switch in an afternoon

Switch from your current reseller — free.

We migrate active cPanel, Plesk, LiteSpeed and CloudLinux licenses from any reseller. We prorate the first month so you never pay twice, and your customers see zero downtime during the swap.