Webmin multiple PHP versions – The easy way to configure

Table of Contents

PHP is one of the most popular scripting languages used on many websites.

Webmin server support multiple PHP versions. Thus, users get more flexibility while designing websites. At times, these PHP versions can create conflict and may not work properly.

At 1 onlyhost, we often get requests from our customers to resolve the problems with “Webmin multiple PHP versions” as part of our Server Management Services.

Today, we’ll see how our Support Engineers solved the errors related to “Webmin multiple PHP versions”.



How we configure multiple PHP versions in Webmin

In Webmin, multiple PHP versions can be used in the same server. Also, it allows selecting different PHP for versions per domain and per directory. That means, a user can build his website on PHP5.x or PHP7.x.

To set up multiple PHP versions in Webmin, our Support Engineers took the following steps.

For example in CentOS 6,

1. Firstly, we login into the server as a root user.

2. To Install PHP 5.6  and PHP 7 on CentOS 6, we run the below commands.

yum install centos-release-scl

Install the PHP packages:

yum install rh-php56 rh-php56-php-mysqlnd

yum install rh-php70 rh-php70-php-mysqlnd

3. Next, we enable “suexec_module” on the server, it helps to recognize different PHP versions.

4. For that open httpd.conf, Then find and uncomment the line “#LoadModule suexec_module modules/mod_suexec.so.

vi /etc/httpd/conf/httpd.conf

5. Also, we save and close the file. Then restart Apache

service httpd restart

6. Again, we log into your Webmin control panel

7. Then, we go to “Server Configuration > PHP version” and select the appropriate PHP version.

8. Finally, we click the Save button.

On successful installation, both PHP versions shows up on the Webmin interface. A sample software versions list on a CentOS7 server looks as below.


How we fixed errors related to multiple PHP versions configuration

Now, let’s see how our Support Engineers solved the related errors with multiple PHP versions.


1. Incorrect Default PHP version on the server

Recently, one of our customers had an issue with his PHP versions. After he changed the PHP version 5.6 to 7, through Webmin front-end, it didn’t reflect when he checked at the backend. This happened due to wrong PHP default version.

Then our Support Engineers took the following steps to solve the issue.

1. We logged into the server and run the following command.

php -v

Then PHP version showed as PHP 5.6.

2. So we enabled PHP 7 as the default version on the server by linking the correct PHP binary.

That’s it. Now, the PHP version changed from 5.6 to 7


2. Missing PHP extensions

Sometimes, enabling PHP version doesn’t solve the problem. It may require updated PHP extension too.

So, our Support Engineers installed/updated them via software packages.

1. We logged into Webmin > System Software Packages > Chose Package from YUM > Click Browse YUM,  typed the PHP extension name in the search box and clicked find packing matching button. Then, we clicked the Package name and install.


[ Having trouble while configuring Webmin multiple PHP versions? We’ll fix it for you.]



In short, it is possible to use “Webmin multiple PHP versions” on the same server. Also, Webmin allows different PHP versions to be selected for each domain and directory. Today, we saw how our Support Engineers configured multiple PHP version and solved related errors with it.

Leave a Comment

Your email address will not be published. Required fields are marked *

Social Share


Cheapest Web Hosting

Fasters Web Hosting Promo
Scroll to Top

Launch your Website at RS599

Create a professional website yourself with our domain hosting combo. Get Extra benefits at this Year end Sale with 10% OFF and Enjoy Amazing Deels on Shared Hosting!

Starting at Only RS599/Year

Year End Sale


Use Code STARTBIZ at Checkout.

Create an earning opportunity with A Web Hosting Business

Become reseller and start reselling domains, web hosting, ssl certificates and More.

45% OFF

Starting at RS399/Month


Use coupon: at the checkout.