Home / Blog / VPS & Cloud / How to Install LiteSpeed Web Server (LSWS) o…
VPS & Cloud

How to Install LiteSpeed Web Server (LSWS) on cPanel/WHM

LiteSpeed Web Server (LSWS) is a high-performance, Apache drop-in replacement. It reads .htaccess files natively, handles HTTP/3 and QUIC, and serves PHP via LSAPI — which is up to 50% faster than Apache's mod_php. The LiteSpeed WHM plugin replaces Apache entirely with zero configuration changes needed for existing sites.

LiteSpeed vs Apache — Key Differences

  • Speed: LiteSpeed handles 6–9× more concurrent connections under load
  • PHP: LSAPI processes PHP significantly faster than mod_php or FastCGI
  • Memory: Uses 2–4× less RAM per request than Apache
  • HTTP/3: Full QUIC and HTTP/3 support out of the box
  • Cache: Built-in LiteSpeed Cache (LSCache) for WordPress, Joomla, OpenCart
  • .htaccess: Fully compatible — no config migration needed

Prerequisites

  • cPanel/WHM server (AlmaLinux 8/9 or CloudLinux)
  • Root WHM access
  • LiteSpeed Enterprise licence from litespeedtech.com (a free 1-domain licence is available; production requires a paid licence)

Step 1 — Install the LiteSpeed WHM Plugin

bash
wget -O - https://rpms.litespeedtech.com/cpanel/whm_plugin.sh | bash

Step 2 — Access the Plugin in WHM

Navigate to WHM > LiteSpeed Web Server. You'll see an Install/Switch tab. Enter your LiteSpeed serial number (or leave blank for a trial) and click Install LiteSpeed.

The plugin stops Apache, installs LiteSpeed, and starts it automatically — the whole swap takes under 2 minutes.

Step 3 — Verify LiteSpeed is Running

bash
systemctl status lsws
curl -I http://localhost | grep Server

You should see Server: LiteSpeed in the response headers.

Step 4 — Switch PHP to LSAPI

In WHM, go to MultiPHP Manager and ensure PHP handlers are set to litespeed. This activates LSAPI for maximum PHP performance.

Step 5 — Enable LiteSpeed Cache for WordPress

Install the LiteSpeed Cache plugin (free, on wordpress.org) on each WordPress site. Configure it in the WP admin under LiteSpeed Cache > Cache > Enable Cache. LiteSpeed's server-side cache stores full-page HTML and serves it without PHP execution for anonymous visitors — dramatically reducing TTFB.

Switching Back to Apache (if needed)

The WHM plugin makes it trivial to switch back:

bash
/usr/local/lsws/admin/misc/cp_switch_ws.sh apache

Conclusion

Switching from Apache to LiteSpeed is one of the highest-impact performance upgrades you can make on a cPanel server. Existing sites work without any changes, and high-traffic WordPress sites see immediate improvements from LSCache. For budget-conscious hosting, LiteSpeed lets you serve significantly more traffic on the same hardware.