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

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to Block an IP address From Visiting My Websites Through IIS?

You can restrict the access of any particular website for any specific IP address. You can add an...

How to generate CSR key and install SSL certificate on IIS 8?

SSL (Secure Sockets Layer) is an encryption technology, which creates an encrypted connection...

How to Fix HTTP Error 500 (or 500.21) - Internal Server Error Handler SSINC-shtml?

Error Message HTTP Error 500 (or 500.21) - Internal Server Error Handler SSINC-shtm' handler...

How to Add Website in IIS?

This article will assist you to add new website in IIS. If you have opted for the WebsitePanel,...

How to deny URL sequence from IIS?

Request Filtering is a built-in security feature of IIS. Using Request Filtering feature one can...