Skip to main content

Installing PHP 7 on WAMP server (For windows)

The PHP community has released major update over a decade as PHP 7. PHP 5 brings many exited features like support of Object oriented programming and many related with that.

You guys may wonder why PHP community released PHP 7 just after PHP 5 why there is no PHP 6? Well requirement for PHP 6 were not defined clearly and most of the people not agreed with, so the project ground to the halt. Almost all the features defined for PHP 6 were already implemented in PHP 5.3 and it’s later versions of PHP 5. So we almost got everything, which was documented for PHP 6, when features set for a major release community decided to avoid confusion with dead project and skip to PHP version 7 with the major updates.

 

Installing PHP 7 on WAMP server

We assume you already have wamp server installed on your window pc.

Download PHP7 Thread Safe Version

You need to download php 7 latest thread safe version from http://windows.php.net/qa , you need to find the version suitable on your OS, like for 64 bit OS download VC14 x64 Thread Safe. I would highly recommend to go for the Thread Safe version do not download Non Thread safe.

Download Visual C++ redistributable Package

If you already have installed you can skip this step but if you are not sure please download Visual C++ redistributable from https://www.microsoft.com/en-us/download/details.aspx?id=48145 , Please find the Version which is suitable for you OS. If you not sure you can download and install both x64 and x86.

 

Installing PHP7 on WAMP Server

  1. Now go to your wamp directory assume you have installed wamp on D drive then it would be D:/wamp/bin/php/ . Create new folder named php7.X.X , here X.X is the Thread safe version you have downloaded. Assume you have downloaded 7.0.7 then the folder name would be php7.0.7 , extract all content which is downloaded from php7.0.7 Thread safe zip
  2. After that go to your old php version if you have old php version 5.5.12 then go to D:/wamp/bin/php/php5.5.12/ copy php.ini and wampserver.conf to your new php7.0.7 folder.
  3. Now edit newly copied php.ini in notepad, find extension_dir and change the path to D:/wamp/bin/php/php7.0.7/ext now find the extension lists search for the line ; Be sure to appropriately set the extension_dir directive and replace all the extension list with the following code until Module Settings part.
  4. Now save the php.ini and create duplicate file and name it phpForApache.ini .
  5. Find wampserver.conf file and edit in notepad, replace the file code with following:
  6. After all those changes stop wamp server and restart it.
  7. Navigate to wamp icon and go to PHP > PHP version there you will find the new php7.0.7 version.

 

Conclusion

We have tested this method on wamp server version 2.5 and installed php 7.0.7 RC1 thread safe on it. If you encounter problem please double check all steps and make sure you stop all services and restart wamp server. You can also leave your comment and let us know how your installation goes throw.

Happy Coding 🙂

Hardik Joshi

Hardik Joshi is Founder, Developer and Writer at eCodezone.com, He loves to write usable code for the Web and other digital sources.