Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to Run Multiple PHP Versions in Windows VPS?

There are times when your PHP websites rely on functions/features that are available only in some specific versions of PHP. To host such applications on one web server, you will need to run different PHP versions side by side.

Running multiple PHP versions simultaneously will also help you to test the features of newest release of PHP before deploying it to live websites. The following tutorial will assist you to run multiple PHP version parallelly in single web server.

 

IMPORTANT - Once you configure multiple versions of PHP in IIS, you’ll have to manage PHP websites from IIS only. Any single change from WebsitePanel will overwrite the all the changes you have made to specific website.

 

Download new PHP version


With Windows full VPS configuration, you will get PHP 5.x version pre-installed .

  1. To use different version, download your choice of PHP version (non thread safe) from PHP.net

  2. Extract the PHP folder and place it under C:\Program Files (x86)\PHP so that you will have different PHP versions in their own folders.

 

Register new PHP version in IIS

 

  1. Open Internet Information Service Manager ( Start >> Run >> type inetmgr and hit enter).

  2. From the Connections pane select the server name (or specific website name). Under Features view, locate and double click PHP Manager.

    PHP Manager

  3. Under PHP Setup, click on Register new PHP version link. Browse the new PHP folder path up to php-cgi.exe file and click on Open. For example, (C:\Program Files (x86)\PHP\php-5.6.15\ php-cgi.exe).

    Browse PHP Version

 

Change new PHP version for a website in IIS

 

  1. Open Internet Information Service Manager ( Start >> Run >> type inetmgr and hit enter).

  2. From the Connections pane, expand the Sites and select your choice of website. Under Features view, locate and double click PHP Manager.

  3. Under PHP Setup, click on Change PHP version link. Select the PHP version from drown down and click OK.

    Change PHP Version Menu

  4. To verify if your website is using new PHP version, click on Check phpinfo() link.

    Check phpinfo.php


Was this answer helpful?

« Back

chat