Table of Contents

How to convert your cPanel server to LiteSpeed in 20 minutes (deprecated)

We recommend to install our WHM plugin and LSWS through one line auto installer.

The following wiki outline the steps to install whm plugin, then LSWS, then PHP, which is now deprecated.

This only works with LiteSpeed Enterprise Edition, you need a trial key or an Enterprise License serial number.

Step 1: Install LiteSpeed WHM plugin

Run the following commands from ssh as root

cd /usr/src; curl https://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh | sh

Note: To uninstall WHM LiteSpeed plugin, run the following command:

/usr/local/cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh

Step 2: Install LiteSpeed Speed Web Server from within WHM

  1. Click the “LiteSpeed Web Server” plugin. (In the “Plugins” section at the bottom of the scroll menu)
  2. Click “Install LiteSpeed Web Server”
  3. Fill in the form to sepecify
    • Trial license key or serial number
    • LiteSpeed target installation directory
    • Port Offset (set to 0 to replace Apache otherwise set a number like “2000” for example to try LiteSpeed on port 2080)
    • Whether to enable PHP SuEXEC
    • Your Administrators email address.
    • Username and password for LWSW WebAdmin Console
  4. Click “Next” to install LiteSpeed

Step 3: Config PHP

For EA4, Plugin will handle it through script

Our plugin will detect the right configuration and correct them when needed. You don't need to build matching PHP any more.

For EA3, Build matching PHP binary

LSWS comes with a pre-built PHP 4 binary. However, you should build your own PHP binary using configuration options matching those used by Apache mod_php.

Then, click “Build Matching LSPHP”. This step will take a while.

NOTE:If you see one of the below error messages when running “Build Matching LSPHP”, try increasing “Max cPanel process memory (minimum: 512)” in the side menu under Server Configuration » Tweak Settings to at least 512MB.

Found Errors

ERROR: /usr/local/bin/php -i returns 6 

You can try to build matching PHP from command line: 
"/usr/local/cpanel/whostmgr/cgi/lsws/cmd_buildmatchingphp.sh"

Or

Found Errors

ERROR: /usr/local/bin/php -i returns 134

You can try to build matching PHP from command line: 
"/usr/local/cpanel/whostmgr/cgi/lsws/cmd_buildmatchingphp.sh"

Step 4: Start LiteSpeed again

Click “Restart LiteSpeed”.

You can now verify if everything is working as expected. It should be! 8-)

You can now replace Apache with LiteSpeed Web Server. Click “Change Port Offset” and set the value to 0 if you had not done so previously. Click “Switch to LiteSpeed” and that's it!

WARNING: Do NOT uncheck the “Apache Web Server” (httpd) service under WHM's service manager. If you do this WHM will not restart LiteSpeed automatically when configuration changes have been made.

cPanel installation tips

Please also refer to cpanel installation tips.