This article provides a guide for how to uninstall LiteSpeed Web Server from cPanel server.
In this guide we will discuss the process for uninstalling LiteSpeed Web Server from a cPanel server that has been configured with LiteSpeed as the primary web server.
This means stopping the LiteSpeed server, converting safely back to Apache web server, uninstalling the LiteSpeed plugin and modules, followed by full LiteSpeed files removal. Finally, we will provide steps to insure LiteSpeed Web Server is not built and started on server boot (from cPanel automation scripts).
Let's get started!
How to Uninstall LiteSpeed Web Server from cPanel Server
This guide assumes you have root-level access of the cPanel/WHM servers, where LiteSpeed Web Server has been installed and configured to replace Apache as the system's default web server.
- First, we need to configure the Apache webserver to take over web serving responsibilities for the LiteSpeed server that will be removed, so login to the server's SSH as root user:
- Run the following script, which will stop the LiteSpeed server and attempt seamless conversion to Apache/HTTPD:
- Once this script has completed, ensure the Apache server has started and is available for the cPanel and hosted accounts web serving processes. To verify Apache status, run the following as the root user:
systemctl status httpd -l
- Check the output of the previous command to verify the HTTPD service has started as expected.
- Once this is confirmed, it is time to begin uninstalling the LiteSpeed module and files. As root (or equivalent) user, run the following command:
- Once this has successfully completed, please run the following command as the root-level account:
- This command removes all LiteSpeed components and files and configures Apache HTTPD to serve as the dedicated web server. After completion, LiteSpeed will be fully removed from the server.
- Finally, the last step is to create the "disable_auto_lsws" touch file, which prevents cPanel/WHM from attempting to compile, install and run LiteSpeed web server automatically on boot. So, as the root-level user, run the following command to create the "disable_auto_lsws" touch file:
- Congratulations! You have successfully uninstalled LiteSpeed Web Server and replaced with Apache HTTPD server and setup "disable_auto_lsws" touch file to prevent unintended/unwanted future actions from the cPanel server.
You now know how to uninstall LiteSpeed Web Server from cPanel server.