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 → Plugins → LiteSpeed 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:
- Click LSWS Configuration → General → PHP Suexec Level → set to
2(full suEXEC). - 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.
- 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:
- Stops the Apache
httpdprocess - Starts
lshttpdon the same ports (80, 443, 2082, 2083, 2086, 2087, 2095, 2096) - Updates
chkserv.dso cPanel's service monitor watcheslshttpd, nothttpd - 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.
Step 6 — Turn on LSCache (optional but recommended)
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_rewriterules with non-standard backreferences. Rare, but shows up in old e-commerce installs.
Do I need to reinstall WordPress sites after switching to LiteSpeed?+
Does LSWS work with CageFS and CloudLinux?+
Will EasyApache still work after I install LSWS?+
Can I run LSWS without buying LSCache separately?+
Does the LSWS licence cover unlimited cPanel accounts?+
Next steps
- Activate LSCache on your WordPress accounts — see enable LSCache for WordPress on a cPanel server.
- Compare LSWS to the free alternative in LiteSpeed Web Server vs OpenLiteSpeed for cPanel hosting if you're still deciding.
- Pair LSWS with CloudLinux to cap per-user resource usage — start with installing CloudLinux on cPanel.