How7o
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Reading: How to Switch from LiteSpeed to Apache in WHM/cPanel
Share
How7oHow7o
Font ResizerAa
  • OS
Search
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Follow US
© 2024–2026 How7o. All rights reserved.
How7o > Free Laravel, PHP, WordPress & Server Tutorials > Server Management > How to Switch from LiteSpeed to Apache in WHM/cPanel
Server Management

How to Switch from LiteSpeed to Apache in WHM/cPanel

how7o
By how7o
Last updated: May 23, 2026
4 Min Read
Switch from LiteSpeed to Apache in WHM/cPanel
SHARE

To switch from LiteSpeed to Apache in WHM/cPanel, run LiteSpeed’s bundled switching script as root: /usr/local/lsws/admin/misc/cp_switch_ws.sh apache. The script flips cPanel’s web-server preference and stops the LiteSpeed service. If LiteSpeed is still running afterwards, stop it explicitly with lswsctrl stop.

Contents
  • Run the switch script
  • If LiteSpeed is still running
  • Switch back to LiteSpeed
  • Verify after switching
  • Frequently asked questions
  • Related guides
  • References

Last verified: 2026-05-17 on cPanel/WHM 118 with LiteSpeed Web Server Enterprise. Originally published 2023-12-30, rewritten and updated 2026-05-17.

Run the switch script

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

cp_switch_ws.sh is LiteSpeed’s official helper for cPanel servers. It updates the cPanel “Web server” setting, stops LiteSpeed, and starts Apache. The argument is either apache or lsws.

Switch LiteSpeed to Apache in WHM — cp_switch_ws.sh apache, verify, optional lswsctrl stop

If LiteSpeed is still running

sudo /usr/local/lsws/bin/lswsctrl stop

The script normally stops LiteSpeed, but if the service is still up (you can check with systemctl status lsws or ps aux | grep lshttpd), force-stop it with lswsctrl. After that, only Apache should be listening on ports 80/443.

Switch back to LiteSpeed

sudo /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws

Same script, different argument. cPanel’s per-account configuration is preserved across switches, so sites come back online with the same virtual-host configuration as before.

Verify after switching

# Apache should be running
sudo systemctl status httpd

# LiteSpeed should not be
sudo systemctl status lsws

# Or check what's bound to ports 80 / 443
sudo ss -tlnp | grep -E ':(80|443)\s'

# Hit a real site and check the Server header
curl -sI https://your-domain.example.com/ | grep -i server

The Server response header confirms which web server is actually answering. Apache means the switch worked; LiteSpeed means something is still routing through LSWS.

Frequently asked questions

Why does WHM warn that “both LiteSpeed and Apache are running”?

The WHM UI flips the cPanel-level web-server preference, but LiteSpeed’s own service can stay up on its own port. With both services listening you get the warning. The cp_switch_ws.sh script handles both sides — switches the cPanel preference and stops LiteSpeed — which is why it’s the cleaner way to switch.

Will my sites have downtime during the switch?

A short outage (a few seconds to a minute) — the old service stops while the new one binds to the ports. For a busy production server, schedule the switch outside peak hours. The order in cp_switch_ws.sh minimises the gap, but it’s not zero.

What’s the difference between LiteSpeed Enterprise and OpenLiteSpeed?

LiteSpeed Enterprise (the licensed product) drops in as a 100% Apache httpd.conf replacement — same config files, same modules concept. OpenLiteSpeed (free) has its own native config format. This post and the cp_switch_ws.sh script apply to LSWS Enterprise on cPanel. OpenLiteSpeed doesn’t ship the script.

Can I switch back to LiteSpeed later?

Yes — same script, different argument: /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws. cPanel-level config is preserved through the switch (your virtual hosts, account settings, etc. are stored in cPanel’s own files and survive intact).

Related guides

  • How to Reset the LiteSpeed WebAdmin Console Password
  • How to Install the Apache Web Server on Ubuntu
  • How to Fix Quotas in cPanel

References

LiteSpeed cPanel switching: docs.litespeedtech.com/lsws/cp/cpanel. cPanel web-server configuration: docs.cpanel.net/whm.

TAGGED:ApacheconfigurationcPanelLiteSpeed

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article Replace jQuery .each with vanilla JavaScript loops How to Replace jQuery’s .each() with Vanilla JavaScript
Next Article Disable binary logging in MySQL or MariaDB How to Disable Binary Logging in MySQL or MariaDB
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

FacebookLike
XFollow
PinterestPin
InstagramFollow
Most Popular
Set vi as the default editor in Ubuntu — a terminal opening the vim editor
How to Set vi (Vim) as the Default Editor in Ubuntu
June 8, 2026
rsync says ALL DONE but files are missing — a terminal showing ALL DONE next to an empty folder
rsync Says “ALL DONE” but Files Are Missing: How to Verify
June 8, 2026
Migrate a website to a new server with rsync — files copying from an old server to a new one over SSH
How to Migrate a Website to a New Server With rsync
June 8, 2026
Bun runtime — faster JS toolkit replacing npm in Laravel projects
How to Install Bun Runtime on Ubuntu (And Use It in a Laravel Project)
May 24, 2026
Tailscale mesh — peer-to-peer connections between devices, coordination server
How to Install Tailscale on Ubuntu (Zero-Config Mesh VPN for Self-Hosters)
May 24, 2026

You Might Also Like

Change welcome message on Ubuntu VPS server (MOTD + SSH banner)
Server Management

Change Welcome Message on Ubuntu VPS (MOTD + SSH Banner)

6 Min Read
Reduce high memory usage on Windows 11
OS

How to Reduce High Memory Usage on Windows 11

7 Min Read
Delete all lines in Vim with :%d
Server Management

How to Delete All Lines in a File with Vi or Vim

4 Min Read
Install Laravel on Ubuntu — terminal with composer create-project command and Laravel red-pillar icon
Web Development

How to Install Laravel on Ubuntu: Step-by-Step Guide

9 Min Read
How7o

We provide tips, tricks, and advice for improving websites and doing better search.

Tools

  • Age Calculator
  • Word Counter
  • Image Upscaler
  • Password Generator
  • QR Code Generator
  • See all tools→

Pranks

  • Fake Blue Screen Prank
  • Hacker Typer
  • Fake iMessage Generator
  • Windows XP Crash Prank
  • Windows 11 Update Prank
  • See all prank screens →

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service
  • Sitemap
© 2024–2026 How7o. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?