//Tutorials

Replace Apache with LiteSpeed in WHM for Faster Sites

Switch from Apache to LiteSpeed on your AtoZNode VPS or dedicated server to cut CPU load, boost page speed, and simplify caching with LSCache.

6 min read
Replace Apache with LiteSpeed in WHM for Faster Sites

Running a busy website or web‑application on a shared or dedicated server often requires balancing performance and resource usage. Many cPanel/WHM users begin with Apache, but under heavy traffic Apache’s process‑based model can become a bottleneck, especially when dynamic content, many concurrent connections, or complex .htaccess rules are involved.

Why Switch to LiteSpeed?

  • Event‑driven architecture – LiteSpeed handles thousands of simultaneous connections with far less memory and CPU than Apache.
  • Built‑in LSCache – A powerful page‑cache that works at the web‑server level, reducing the need for separate caching plugins.
  • Seamless Apache compatibility – LiteSpeed reads Apache’s httpd.conf and .htaccess files, so most existing configurations work without changes.
  • cPanel/WHM integration – The LiteSpeed Web Server (LSWS) plugin adds a GUI inside WHM, making management as easy as the native Apache tools.

For Indian developers and businesses hosting on AtoZNode’s cloud VPS or dedicated servers, moving to LiteSpeed can lower server load, speed up page loads for end‑users, and make better use of the resources you pay for.

Prerequisites

  1. Root SSH access to your server.
  2. WHM version 82 or later (the LSWS plugin requires a recent WHM build).
  3. A valid LiteSpeed license. The free “OpenLiteSpeed” version is suitable for testing; production sites usually need a commercial license.
  4. Server running AlmaLinux 8 (the typical OS for WHM/cPanel on AtoZNode). If you use Rocky Linux or RHEL, the commands are identical.

Step 1 – Install the LiteSpeed Web Server (LSWS) Package

The official LiteSpeed repository contains a ready‑to‑install RPM. Each line below is followed by a comment that explains its purpose.

# Add the LiteSpeed repository
dnf install -y epel-release               # Enables EPEL packages required by LSWS
rpm -Uvh https://repo.litespeedtech.com/centos/litespeed-repo-1.0-1.el8.noarch.rpm   # Adds the LiteSpeed repo

# Install LiteSpeed
dnf install -y openlitespeed              # Installs the free OpenLiteSpeed binary
# For the commercial edition, replace the package name:
# dnf install -y litespeed

# Start and enable the service
systemctl start lsws                       # Starts LiteSpeed immediately
systemctl enable lsws                      # Enables LiteSpeed to start on boot

After these commands, LiteSpeed listens on port 8088 by default while Apache continues on port 80.

Step 2 – Install the LiteSpeed WHM Plugin

The plugin adds a “LiteSpeed Web Server” section inside WHM, letting you switch between Apache and LiteSpeed, view real‑time statistics, and manage LSCache.

# Download the latest plugin script
wget -O /usr/local/cpanel/scripts/install_litespeed.sh https://raw.githubusercontent.com/litespeedtech/lsws-whm-plugin/master/install_litespeed.sh

# Run the installer (it will detect WHM version and configure the plugin)
bash /usr/local/cpanel/scripts/install_litespeed.sh

# Verify installation
/usr/local/cpanel/whostmgr/bin/whmapi1 list_plugins | grep -i litespeed

When the script finishes, a new “LiteSpeed Web Server” icon appears in WHM’s left navigation pane.

Step 3 – Replace Apache with LiteSpeed

From WHM:

  1. Log in to WHM as root.
  2. Navigate to LiteSpeed Web Server → LiteSpeed Service Manager.
  3. Click Switch to LiteSpeed. The plugin will stop Apache, adjust the listening ports, and start LiteSpeed on port 80.

The plugin performs the following actions:

# Stop Apache
systemctl stop httpd

# Restart LiteSpeed with the new listener port
/usr/local/lsws/bin/lswsctrl restart -f

# Enable LiteSpeed to start on boot and disable Apache
systemctl enable lsws
systemctl disable httpd

Confirm the active web server:

curl -I http://localhost | grep Server
# Expected output: Server: LiteSpeed

Step 4 – Enable LSCache for WordPress, Joomla, and Other CMSs

LSCache works at the server level, but most CMSs need a small plugin or module to send cache‑control headers.

WordPress

  1. Log in to the WordPress admin dashboard.
  2. Go to Plugins → Add New and search for “LiteSpeed Cache”.
  3. Install and activate the plugin.
  4. In the plugin settings, enable Cache and optionally Image Optimization and Browser Cache.

Joomla

  1. Download the “LiteSpeed Cache for Joomla” extension from the Joomla Extensions Directory.
  2. Install it via the Joomla Extension Manager.
  3. Enable the cache in the extension’s configuration page.

Drupal

Drupal 9/10 already includes a page cache. You can further improve it by adding the “LiteSpeed Cache” module from the Drupal repository and enabling the lscache service in /etc/litespeed/conf.d.

Step 5 – Fine‑Tune LiteSpeed Settings for Indian Traffic Patterns

While the default configuration works well for most sites, you may want to adjust a few parameters to match typical usage on Indian networks (e.g., higher latency, mobile‑first traffic).

  • Connection Timeout – Increase to 30 seconds if you notice many slow‑handshake connections.
  • Max Connections – Set a value based on your RAM (e.g., maxConns 5000 for a 4 GB VPS).
  • GZIP Compression – Enable for all text types to reduce bandwidth.
  • SSL Offloading – If you terminate SSL at a load balancer, enable SSL Offload to let LiteSpeed serve HTTP internally.

All these options are accessible via WHM → LiteSpeed Web Server → Configuration → Tuning. After making changes, click Save & Restart to apply them.

Step 6 – Verify the Performance Impact

Before and after switching, run a simple load test to see the difference in CPU and memory usage. Use ab (ApacheBench) or wrk from another server:

# Install the test tool (example with wrk)
dnf install -y wrk

# Run a 30‑second test against your domain
wrk -t4 -c100 -d30s https://yourdomain.com/

Compare the Requests/sec and Latency figures, as well as the server’s top or htop output during the test. You should see lower CPU percentages and less memory consumption with LiteSpeed, especially under high concurrency.

Step 7 – Keep Your Installation Updated

Security patches and performance improvements are released regularly. Use the following commands to keep LiteSpeed current:

# For OpenLiteSpeed (free)
dnf update -y openlitespeed

# For commercial LSWS
dnf update -y litespeed

# Update the WHM plugin (runs automatically with WHM updates)
whmapi1 install_plugin module=lsws

Enable automatic updates in WHM → LiteSpeed Web Server → Auto‑Update if you prefer a hands‑off approach.

Conclusion

Replacing Apache with LiteSpeed inside WHM gives Indian developers on AtoZNode a practical way to reduce server load, improve response times, and leverage the powerful LSCache system without rewriting existing .htaccess rules or site code. The integration is straightforward: install the LSWS package, add the WHM plugin, switch the web server, and enable LSCache for your CMS. With a few tuning tweaks, you’ll see a noticeable drop in CPU usage and faster page delivery for visitors across the sub‑continent.

Start with the free OpenLiteSpeed build to evaluate the benefits, then upgrade to a commercial license as your traffic grows. The seamless WHM interface ensures you can manage the server just as you do with Apache, while enjoying the performance edge that LiteSpeed provides.

litespeedcpanelwhmapacheweb serverlscachealmalinuxvps

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.