Configure multiple php on litespeed cPanel server

Date posted: 04-09-2017

By default cPanel runs with apache webserver. Normally Easy apache 4 or Easy apache 4 will help on installing multiple php version.  In this post, we will explain on how to configure litespeed webserver to use multiple php version.

Prerequisites:

  1. WHM access(Default URL will be http://IPaddress:2086)
  2. Litespeed Admin Panel access(Default URL will be http://IPaddress:7080)
  3. Server root access details.

Implementation:

Install the ea-phpxx-php-litespeed version. In this post, we will show on how to install php 55 on litespeed

yum install ea-php55-php-litespeed

Incase if we want to install different version of php or multiple version of php, use the following command

yum install ea-php56-php-litespeed ea-php71-php-litespeed

This will create below file incase if you install php 55

ls -la /opt/cpanel/ea-php55/root/usr/bin/lsphp

Incase if we install multiple version of php then corresponding file will be created on /opt/cpanel/ea-phpxx/root/usr/bin. 

Login to litespeed panel using the IP address(http://IPaddress:7080)

Go to Configuration > External App > Add

 

 

 

 

Select New External App and click on Next

 

 

 

 

 

 

Add the following information

Name: php55

Command:/opt/cpanel/ea-php55/root/usr/bin/lsphp

Leave the remaining options to default.

 

 

 

 

 

 

 

 

Click on Save to complete the app.

Under Script handler, click on Add

 

 

 

 

 

 

 

 

 

 

 

Add the following information.

Suffixes:php55

Handler Type: Litespeed SAPI

Handler Name: lsphp55

 

 

 

 

 

 

 

 

 

 

Restart litespeed service from WHM(Home >> Plugins >> LiteSpeed Web Server Plugin)

Now, you can switch the Php version from WHM for any domain(Home >> Software >> MultiPHP Manager

Leave a Reply

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny