Switch Apache to LiteSpeed Enterprise on cPanel in 15 Minutes
Switch Apache to LiteSpeed Enterprise on cPanel in under 15 minutes with this step-by-step guide for AlmaLinux 8.
5 min read
Running a high‑traffic website or a resource‑intensive web app on a shared‑hosting control panel usually means you are using Apache as the default web server. Apache is reliable, but many cPanel users find that LiteSpeed Enterprise offers better concurrency, lower CPU usage, and built‑in caching with minimal configuration changes. Swapping Apache for LiteSpeed on a cPanel server can be completed in under 15 minutes.
Why Switch to LiteSpeed Enterprise?
Performance: LiteSpeed’s event‑driven architecture handles thousands of simultaneous connections while using far less memory than Apache’s process‑based model.
Compatibility: It reads Apache’s httpd.conf and .htaccess files, so most existing sites work without modification.
Built‑in caching: LSCache accelerates dynamic CMS platforms (WordPress, Joomla, etc.) out of the box.
cPanel integration: The LiteSpeed plugin adds a “LiteSpeed Web Server” section to WHM, letting you manage settings from the familiar interface.
Prerequisites
A server running cPanel & WHM. The steps below assume AlmaLinux 8 (or Rocky 8 / RHEL 8), the current supported OS for cPanel.
Root SSH access.
A valid LiteSpeed Enterprise license (or a trial key). Obtain a trial from the LiteSpeed website and apply it later in WHM.
Step 1 – Prepare the System
Log in via SSH as root, update the package index, and install the tools needed for the installer.
# dnf update -y
# dnf install -y wget curl
What the commands do:
dnf update -y – Downloads and installs the latest security patches and package updates.
dnf install -y wget curl – Installs wget and curl, which are required to fetch and verify the LiteSpeed installer.
Step 2 – Download and Run the LiteSpeed Installer
LiteSpeed provides a script that handles download, installation, and initial configuration.
Updates cPanel’s service map so future restarts use LiteSpeed.
Verify the change:
# systemctl status lsws
# systemctl status httpd
You should see LiteSpeed active (running) and Apache inactive (dead). Visiting a hosted domain will display the default LiteSpeed “Welcome” page if no virtual host files exist, confirming the server is responding.
Step 6 – Fine‑Tune LiteSpeed Settings (Optional)
The default configuration works for most sites, but you may want to adjust a few options.
Worker Processes: WHM → LiteSpeed → Server Configuration → General Settings → “Number of Workers”. Set this to the number of CPU cores (e.g., 4 for a 4‑core VM) to match LiteSpeed’s event loops to your hardware.
Cache: Enable LSCache for supported CMS platforms via the “Cache” tab. For WordPress, install the “LiteSpeed Cache” plugin from the WordPress admin dashboard.
Security Headers: Use the “Rewrite Rules” section to add headers such as Header set X‑Content‑Type‑Options nosniff without editing Apache configs.
All changes made through the WHM interface are written to /usr/local/lsws/conf/httpd_config.conf. After any adjustment, click “Graceful Restart” in the LiteSpeed WHM module to apply the new settings without dropping connections.
Step 7 – Verify Site Functionality
Test a few representative sites before finishing:
Open a browser and load a static HTML site. Confirm the page loads quickly and the response header includes Server: LiteSpeed.
Visit a WordPress site and check that the LSCache plugin reports cache hits.
Run curl -I https://yourdomain.com from the server and verify a 200 OK status.
If any site shows errors, review its .htaccess for Apache‑specific directives that LiteSpeed does not support (e.g., certain RewriteEngine flags). Most issues can be resolved by consulting the LiteSpeed documentation or adjusting the offending lines.
Conclusion
Replacing Apache with LiteSpeed Enterprise on a cPanel server is straightforward: update the OS, run the official installer, add the cPanel plugin, apply your license, and switch services—all in under 15 minutes. The result is a more efficient web server that leverages existing Apache configurations while delivering lower CPU load and built‑in caching. After the switch, you continue managing domains, email, and DNS through WHM as before, but with the performance benefits of LiteSpeed.
lite speedcpanelapacheweb serverlinuxserver administrationperformancelsws
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.