Empowering your business

Installing PHP 7 on Wamp Server [For Windows]

Things you need to do before installing PHP 7:

  1. Download PHP 7.1.0 Thread Safe version from here http://windows.php.net/qa

Mine is 64-bit OS so I downloaded 64-bit Thread Safe version

  1. Download VC 14 Packages from here https://www.microsoft.com/en-us/download/details.aspx?id=48145

[Note: VC 14 packages are not supported in Windows XP]

I recommend you to install both 32-bit as well as 64-bit packages

Once done with this, we are all set to install PHP 7

My current Wampserver version is 2.5

Let’s now start installing PHP 7 with following simple steps:

  1. Locate to your wamp directory, (usually C:/wamp). Goto wamp/bin/php

  2. Create a new folder named “php7.1.0” and extract Contents of PHP 7.1.0 zip to this folder

  3. Once done, navigate to your old php folder. (In my case, php5.5.12), and copy php.ini and wampserver.conf to your php7.1.0 folder

  4. Now goto your PHP 7.1.0 folder and edit php.ini in notepad.

Search for extension_dir and change the path to wamp/bin/php/php7.1.0/ext Scroll down to extension section and replace this code below:

; Be sure to appropriately set the extension_dir directive.
;
extension=php_bz2.dll
extension=php_curl.dll
;extension=php_com_dotnet.dll
;extension=php_enchant.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_odbc.dll
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_phpdbg_webhelper.dll
;extension=php_shmop.dll

; The MIBS data available in the PHP distribution must be installed.
; See [www.php.net]
;extension=php_snmp.dll

extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite3.dll
;extension=php_sysvshm.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Once done, save the file and close it

  1. Now make a duplicate of php.ini and name it phpForApache.ini

  2. Next, open wampserver.conf and replace this following code:

$phpConf[‘phpIniDir’] = ‘.’; $phpConf[‘phpExeDir’] = ‘.’; $phpConf[‘phpConfFile’] = ‘php.ini’;

//PHP 7 needs Apache 2.4.x and doesn’t works with Apache 2.2.x

$phpConf[‘apache’][‘2.4’][‘LoadModuleName’] = ‘php7_module’; $phpConf[‘apache’][‘2.4’][‘LoadModuleFile’] = ‘php7apache2_4.dll’; $phpConf[‘apache’][‘2.4’][‘AddModule’] = ‘’;

  1. Once done, Stop all the services of wamp and Exit it

  2. Open wamp again, goto PHP » PHP Version and there you must find 7.1.0

  3. Click on it and there you go, you have successfully installed PHP 7.1.0

  4. Open http://localhost and http://localhost/?phpinfo for further details

If you are facing any issues while installing PHP 7, check out our video tutorial instead:

Subscribe

Stay updated with our newsletter, we occasionally do write about technology, open source and best practices.
Don't worry, we will never share your details and won't spam you either.