How to install LiteSpeed in cPanel

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 http://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!

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.

Order new dedicated server today and get free Litespeed installation

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Which software comes preloaded with new dedicated server?

Buyhttp sets up the following packages so that you don't have to: cPanel/WHM control panel and...

Can you guarantee my server will be hacker proof?

No, nobody can, It is impossible to make a server hacker proof, that's a fact. This is even more...

Do you provide support for complex technical problems?

Our system administrators are capable of tackling any type of technical problem regardless of...

Accessing cPanel/WHM and fixing basic issues

CPanel/WHM Logging in for the first time After you have received the welcome e-mail. you can...

When can I cancel my dedicated server?

Dedicated server cancellation requests must be submitted 7 days in advance and must be submitted...