Emergency server help: get in touch

LiteSpeed on cPanel: Install, Licence, Switch to Apache and Uninstall (Tested)

The LiteSpeed Enterprise commands for cPanel: unattended install with lsws.options, licence check, cp_switch_ws.sh to LiteSpeed and back to Apache, lsup.sh updates, and a clean uninstall with the leftovers we found.

Published 8 min read

Short answer: install with bash <( curl https://get.litespeed.sh ) SERIAL, or use TRIAL for a trial licence. Switch with /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws, and back to Apache with cp_switch_ws.sh apache. Check the licence with /usr/local/lsws/bin/lshttpd -V and update with /usr/local/lsws/admin/misc/lsup.sh.

Applies to LiteSpeed Web Server Enterprise 6.3.7 build 4 (trial licence); cPanel & WHM 138.0 build 15; AlmaLinux 9.8; lab test 11 Oct 2026

To uninstall, in this order:

  1. switch to Apache;
  2. run /usr/local/cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh;
  3. run /usr/local/lsws/admin/misc/uninstall.sh, answering y, n, n so the configuration and logs go too.

We did all of this on our cPanel lab server (cPanel & WHM 138.0 build 15, AlmaLinux 9.8) on 11 October 2026: a trial install of LiteSpeed Enterprise 6.3.7, the licence and version checks, the switch to LiteSpeed and back, a graceful restart, an update check and a full uninstall. Afterwards the four test sites answered with Server: Apache again. We did not test a paid serial or a licence bought through the cPanel Store.

LiteSpeed commands quick reference

TaskCommandNotes
Install with a serialbash <( curl https://get.litespeed.sh ) SERIALTRIAL instead of a serial requests a trial
Version/usr/local/lsws/bin/lshttpd -vLiteSpeed/6.3.7 Enterprise
Licence status/usr/local/lsws/bin/lshttpd -Ve.g. [OK] Your trial license key will expire in 14 days!
Switch to LiteSpeed/usr/local/lsws/admin/misc/cp_switch_ws.sh lsws6 seconds on our lab
Switch to Apache/usr/local/lsws/admin/misc/cp_switch_ws.sh apache8 seconds on our lab
Graceful restart/usr/local/lsws/bin/lswsctrl restartZero downtime; reload is the same
Status/usr/local/lsws/bin/lswsctrl statuslitespeed is running with PID ...
Stop/usr/local/lsws/bin/lswsctrl stop
Update/usr/local/lsws/admin/misc/lsup.shLatest stable; aborts if already current
Force reinstall/usr/local/lsws/admin/misc/lsup.sh -f-v VERSION picks a version
WebAdmin password/usr/local/lsws/admin/misc/admpass.shConsole on port 7080

Do not run lshttpd -h to look for help. lshttpd has no help option. On our lab, lshttpd -h refreshed the trial key and then started LiteSpeed outside systemd, listening on ports 1080, 1443 and 7080. lswsctrl stop stopped it again. For the options, use lswsctrl help, lsup.sh --help and this page.

Install LiteSpeed on cPanel

The one-line installer asks questions (PHP suEXEC mode, port offset, admin user, whether to switch). Run it in a terminal and answer them, or put the answers in an lsws.options file in the same directory for an unattended install. This is the file we used:

cat > lsws.options <<'EOF'
php_suexec=2
port_offset=1000
admin_user=admin
admin_email=root@localhost
easyapache_integration=1
auto_switch_to_lsws=0
deploy_lscwp=0
EOF
bash <( curl https://get.litespeed.sh ) TRIAL      # or your serial number

Without the file and without a terminal, the installer stopped at the first question and exited with code 1. With the file it finished in about three minutes with **LITESPEED AUTOINSTALLER COMPLETE**, installed 6.3.7 and saved the trial key as /usr/local/lsws/conf/trial.key. It also prints a random password for the WebAdmin console; store it, or reset it later with admpass.sh.

With port_offset=1000, LiteSpeed is installed next to Apache and nothing changes for visitors until you switch. Set port_offset=0 and auto_switch_to_lsws=1 only if you want it to take over at the end of the install. deploy_lscwp=1 would also deploy the LiteSpeed Cache plugin to WordPress sites (the installer printed Skipping LSCache Plugin for WordPress deployment... with 0), so leave it at 0 unless you mean it.

Licence: check, trial and serial

/usr/local/lsws/bin/lshttpd -V       # [OK] ... license key will expire in N days / is valid
ls /usr/local/lsws/conf/             # a trial installs trial.key here

A trial is requested automatically when you install with TRIAL; right after our install, lshttpd -V said 14 days were left. Trials are tied to the server’s IP and are limited, so use the trial on the server you actually want to evaluate. To move to a paid licence, run the installer again with your serial, or enter the serial in WHM → Plugins → LiteSpeed Web Server. If the licence was bought through the cPanel Store, also note the touch file in the uninstall section.

Switch between LiteSpeed and Apache

/usr/local/lsws/admin/misc/cp_switch_ws.sh lsws      # serve sites with LiteSpeed
/usr/local/lsws/admin/misc/cp_switch_ws.sh apache    # back to Apache

Always use this script or the WHM plugin. LiteSpeed’s documentation warns against switching by hand with service httpd stop and service lsws start. After switching to LiteSpeed on our lab, every site answered with server: LiteSpeed, and LiteSpeed held ports 80 and 443. systemctl is-active httpd still said active, because cPanel’s httpd service now starts LiteSpeed. Check the Server header, not the service name, to see which one is really serving:

curl -sI https://example.com/ | grep -i '^server:'

Switching back took 8 seconds and ended with Apache started successfully.; the sites answered with Server: Apache again.

Update LiteSpeed

/usr/local/lsws/admin/misc/lsup.sh              # newest stable release
/usr/local/lsws/admin/misc/lsup.sh -f           # reinstall even if the version is the same
/usr/local/lsws/admin/misc/lsup.sh -v 6.3.7     # a specific version
/usr/local/lsws/admin/misc/lsup.sh -b BUILD     # a specific build (can be used to go back a build)

On our lab, lsup.sh checked update.litespeedtech.com and printed Latest STABLE release has been installed. No update. -s makes it use HTTPS, and -w skips wswatch.sh.

Uninstall LiteSpeed from cPanel

/usr/local/lsws/admin/misc/cp_switch_ws.sh apache                       # 1. Apache serves the sites again
/usr/local/cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh  # 2. remove the WHM plugin
/usr/local/lsws/admin/misc/uninstall.sh                                  # 3. remove LiteSpeed (answer y, n, n)
touch /var/cpanel/disable_auto_lsws                                      # only if the licence came from the cPanel Store

uninstall.sh asks three questions:

  1. Do you want to uninstall LiteSpeed Web Server? [y/N]
  2. Do you want to keep server configuration files? [y/N]
  3. Do you want to keep server log files? [y/N]

Two traps we hit:

  • With no answer, for example from a script, it printed Abort! but still exited with code 0, so a script will think it worked.
  • Piping yes into it answers y to all three, which keeps the configuration and logs.

For a full removal answer y, n, n, for example printf 'y\nn\nn\n' | /usr/local/lsws/admin/misc/uninstall.sh.

What was left on our lab after the uninstall (we had kept configuration and logs):

LeftoverDetailClean-up
/usr/local/lsws596 KB: conf, logs, lsns, extapp-sockrm -rf /usr/local/lsws once LiteSpeed is gone
/usr/lib/systemd/system/lshttpd.service (alias lsws.service)Enabled unit, not owned by any packagesystemctl disable lshttpd, delete the file, systemctl daemon-reload
User lsadmNo processesuserdel lsadm

The WHM plugin directory was gone after step 2, and Apache kept serving all sites throughout.

Common problems

  • The installer exits straight away. It needs answers. Run it in a terminal or create lsws.options.
  • LiteSpeed runs but the sites still show Apache. You installed with a port offset and have not switched. Run cp_switch_ws.sh lsws.
  • LiteSpeed started on odd ports (1080, 1443). Someone ran lshttpd directly, perhaps with -h. Stop it with lswsctrl stop and use lswsctrl or the switch script from then on.
  • systemctl says httpd is active after switching to LiteSpeed. That is expected on cPanel. Check the Server header.
  • The uninstall “worked” but nothing was removed. It aborted because nobody answered; check for Abort! in the output.
  • 503 errors after switching. See LiteSpeed 503 on cPanel: lsphp limits.

Frequently asked questions

How do I switch from LiteSpeed back to Apache on cPanel?

Run /usr/local/lsws/admin/misc/cp_switch_ws.sh apache as root, or use WHM, Plugins, LiteSpeed Web Server. On our lab it took 8 seconds and every site answered with Server: Apache again.

How do I check my LiteSpeed licence?

Run /usr/local/lsws/bin/lshttpd -V. It prints whether the key is valid and, for a trial, how many days are left. Use lshttpd -v for the version. Do not run lshttpd -h: it starts the server.

How do I completely uninstall LiteSpeed from cPanel?

Switch to Apache with cp_switch_ws.sh apache, run lsws_whm_plugin_uninstall.sh, then uninstall.sh and answer y, n, n so the configuration and logs are removed. Then remove the lshttpd systemd unit and the lsadm user if they are left.

How do I update LiteSpeed Enterprise?

Run /usr/local/lsws/admin/misc/lsup.sh for the latest stable version, lsup.sh -f to reinstall, or lsup.sh -v VERSION for a specific version.

Why does systemctl say httpd is active after switching to LiteSpeed?

On cPanel, the httpd service starts LiteSpeed once you have switched, so the service name stays the same. Check which server really answers with curl -sI https://your-site/ and look at the Server header.

Reading a lot of our guides? Go ad-free with srvScripts Pro for $6 a month. It also pays for new guides. Cancel any time.

Maintenance record

This guide changes servers, data or security settings, so we re-check it against current versions on a fixed schedule. Take a backup or snapshot before you start.

Maintained by
srvScripts editorial team
Supported versions
LiteSpeed Web Server Enterprise 6.3.7 build 4 (trial licence); cPanel & WHM 138.0 build 15; AlmaLinux 9.8; lab test 11 Oct 2026
Last full review
Next review

Share this guide

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.