One of the great things about WAMP is that it allows you to easily switch between different versions of PHP. All you need to do is properly install the different versions of PHP for your machine. Here is how it’s done.

  1. Download the zip file for the version of PHP for Windows that you wish to install.

    • Make sure that you download the correct Thread Safe version — either VC9 or VC11.

      The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed. The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed.

  2. Create a new folder in [path-to-wamp]/bin/php/php.#.#.# where [path-to-wamp] is the location that WAMP is installed on your machine and #.#.# corresponds to the version that you are installing, ie: c:/wamp/bin/php/php5.4.29

    Screenshot of new PHP directory in Windows 7
    New PHP Directory
  3. Extract the all files from your download to the new PHP directory you created in the previous step. That list of files should look similar to the ones captured in the screenshot below.

    Screenshot of new PHP files after being extracted from zip file
    Extract PHP Files
  4. Copy the following files from your old PHP directory to your new PHP directory.

    • php.ini
    • phpForApache.ini
    • wampserver.conf

    These files contain your PHP, Apache and WAMP configurations.

    Screenshot of php.ini, phpForApache.ini and wampserver.conf files inside PHP directory
    Copy Configuration Files
  5. Open the php.ini and phpForApache.ini files in your new PHP directory that you copied in the previous step. Search for any references to your old PHP version and replace them with the new PHP version. You will for sure need to update the extension_dir path. Depending on what PHP extensions you have installed, you may need to update others as well.

  6. Start WAMP (if it’s not already started) and take note of all the active PHP settings and extensions that you are currently running. You will need this information in a future step.

    Screenshot of active PHP settings in WAMP
    Active PHP Settings

    Screenshot of active PHP extensions in WAMP
    Active PHP Extensions
  7. Open your php.ini file in WAMP and create a backup of this file.

    Screenshot of php.ini file in WAMP menu
    WAMP php.ini File
  8. Exit WAMP entirely and restart it.

    Screenshot of Exit option in WAMP menu
    Exit WAMP
  9. Once WAMP has restarted, select the option to Stop All Services.

    Screenshot of stopping all services menu option in WAMP
    Stop All Services
  10. With all services stopped, select the version of PHP that you wish to run from the PHP Version menu in WAMP.

    Screenshot of PHP version in WAMP menu
    WAMP PHP Version
  11. Verify that all PHP settings and extensions are enabled from step 6. Note, there may be a few differences in the available settings and extensions in your new version of PHP.

  12. Open up the php.ini file in WAMP and add all required PHP configuration settings that are present in the php.ini backup file that you created in step 7. The easiest way to identify missing configuration settings is to run a diff between your backup php.ini file from step 6 and your new php.ini file using a tool like DiffNow.

    While everyone’s PHP configuration is slightly different, below are a few required configuration settings that must be updated.

    • Specify the PHP error log directory: error_log =

      Screenshot of file comparison showing the error_log directive
      Error Log Directory
    • Specify the PHP extensions directory: extension_dir =

      Screenshot of file comparison showing the extension_dir directive
      Extensions Directory
    • Specify the PHP upload directory and max upload file size: upload_tmp_dir = and upload_max_filesize =

      Screenshot of file comparison showing the upload_tmp_dir and upload_max_filesize directive
      File Upload Settings
    • Specify the PHP timezone: date.timezone =

      Screenshot of file comparison showing the date.timezone directive
      Timezone Setting
    • Specify your PHP session path: session.save_path =

      Screenshot of file comparison showing the session.save_path directive
      Session Path
  13. Update any custom configuration settings from your php.ini backup file created in step 7 – again by running a diff. I work alot in Magento and explained in another post some of my PHP configuration for importing large databases in WAMP. Below are those values.

    max_execution_time = 5000
    max_input_time = 5000
    memory_limit = 1000M
    post_max_size = 750M

    Screenshot of file comparison showing my PHP custom configuration settings
    Custom Configuration Settings

    Screenshot of file comparison showing my PHP custom configuration settings
    Custom Configuration Settings (continued)
  14. Lastly, Restart All Services in WAMP for your new PHP configuration to take effect. …And give yourself a pat on the back, PHP in WAMP has been successfully upgraded!

    Screenshot of the WAMP menu option to restart all services
    Restart All Services

As Jordan points out in the comments below, you’ll want to update PHP’s location in your Windows Path Variable (links to a post I wrote) following a PHP upgrade.

Posted by: John Dugan


  • Jordan Waeles

    Great guide, got it working first try thanks to it!

    In my case i also to add the path to PHP in the PATH system environment variable (System > Advanced system settings > Advanced > Environment variables… > System variables > PATH) as such: ;C:wampbinphpphp5.4.36 .

    Otherwise, it was giving such errors: PHP Warning: PHP Startup: Unable to load dynamic library ‘c:/wamp/bin/php/php5.4.36/ext/php_curl.dll’ – The specified module could not be found. in Unknown on line 0, even though the file existed at that path and came from the fresh PHP package i installed.

  • Happy to help!

    Thanks for the note regarding the Path variable. Yes, that definitely should be updated as part of the process. Since that is its own set of steps, I threw a link to another post I wrote on the subject.

  • Nikhil Jadhav

    Hey i got the problem regarding to phpmyadmin after doing these steps.
    after getting stuck i uninstall the wampserver2.2 and trying to install wampserver2.5 and now i am getting the error message “The program can’t start because MSVCR110.dll is missing from your computer.”
    please help me out.

  • Hi Nikhil,

    Just to clarify, this post covers upgrading PHP, not all of WAMP.

    The MSVCR110.dll file is the Microsoft Visual C++ Redistributable dll that is needed for projects built with Visual Studio 2011. Information about the file including a link to download can be found here:

    In the future, it’s wise to keep your current copy of WAMP installed when upgrading. That way, if you run into a problem you can revert back to it.

  • Bob

    Thanks for the guide. I followed steps 1-10 + 14 and it worked perfectly as I had no customisation to the standard wamp install. I used;
    $x = 5;
    $y = 5;
    echo "”;
    echo $x ** $y;
    as the simple test to show it worked.

  • Great to hear Bob 🙂

  • Cícero Lourenço

    I followed the steps, but when I try to use new PHP version (5.6.6), Wamp icon keeps yellow, indicating that it’s not online. The old version (5.3) is still working fine. Any suggestion?

  • Hey @cceroloureno:disqus,

    Have a look at your log files. They are stored in the /logs directory of your WAMP root.

  • Twinkle

    I had the same . I checked the steps again . everything seems fine but the icon keep yellow . I downloaded php5.5.22 (VC11 x64 Thread Safe)
    I had this line in php.ini and phpForApatch
    zend_extension = “c:/wamp/bin/php/php5.5.22/zend_ext/php_xdebug-2.2.0-5.4-vc9-x86_64.dll”

    I edit the phpversion to 5.5.22 . is there something else need to change?

  • Twinkle

    Cícero Lourenço,did you fix this ? I had the same problem

  • Fred

    I basically had the same kind of problem. The original version of my X years old WAMP was with PHP5.3.x. I tried similar steps to upgrade it without success. I took a look on the logs “PHP Warning: PHP Startup: in Unknown on line 0” … Nice, thanks for the help logs…
    Finally, after some hours, I recognized that the problem was not the PHP binaries I had, but the WAMP application itself. For any strange reason, it needed php binaries build with specific options and mostlikely specific VisualStudio version. I “simply” unsinstalled it and got last version.
    On the last WAMP version, I added other PHP version following the same steps (and removing the xdebug related extensions that I don’t have from ini), it is working fine.
    The only thing I’m afraid of now, is to not being able to downgrade my PHP version and having all the extension working. I had some strange complains about PHP build ID while trying to run php5.4.38 from command line. But I guess that’s out of this topic.

  • Muhammad Junaid Anwar


  • Cícero Lourenço

    I checked log files, but they didn’t help. I think I will uninstall Wamp and then upgrade it, but only after I finish the current project.

  • Cícero Lourenço

    I didn’t. Same problem. Looks like I’m going to uninstall Wamp and upgrade it.

  • Cícero Lourenço

    I think I’ll follow your path. Seems safer to me.

  • Jessica

    Stuck on Step 10, it’s not showing me the new version, only the old one in the list of versions.

  • Hi Jessica,

    Ensure that you have properly completed steps 4 and 5. As mentioned, make sure to replace any references from the old PHP version to the new PHP version.

  • Vaibhav

    done all the steps which you told in above tutorial, but when i restart the wamp it will not restart. it’s show orange. can you tell me what is the issue in this process???

  • Hi Vaibhav,

    It’s such an open ended question that I cannot begin to diagnose the problem. Ensure that you have in fact completed every single step, then review the comments if you still have problems. There are some good/helpful insights below.

  • Check your error log for more info

  • Nicu Vlad

    Thanks! Done with stepts 1-10, and 14 but i need to change the “extension_dir” value from php.ini

  • santosh

    I have follow every steps which you are discuss in tutorials. But I also facing problem like Vaibhav..

  • Mshigeni L Mganga

    GREAT IT WORKS!!..i jus upgraded from php 5.3.3 to php 5.4.42

  • Mshigeni L Mganga

    GREAT IT WORKS!.i jus upgraded from php 5.3.3 to php 5.4.42

  • Eric LeVan

    Jeez. I failed hard to upgrade to 5.6.12 on my first attempt using a tutorial from the wamp server forums. I wonder if it’s because I didn’t update my Path. i wasn’t even able to revert to my old PHP version. So I ended up installing wamp server 2.5 and trying the upgrade on that vanilla install. It didn’t seem to work until the Path change.

    Now my original Wamp instance works too.

    Thanks John and Jordan!

  • kennysteve

    I followed all the steps faithfully and everything worked fine until the last step where I had to restart all services, and ALAS, wampserver won’t change from orange to green!!!! An investigation into Windows Event Viewer revealed Apache was having trouble. Here’s the error problem: httpd.exe: Syntax error on line 127 of C:/wamp/bin/apache/apache2.2.22/conf/httpd.conf: Cannot load C:/wamp/bin/php/php5.5.28/php5apache2_2.dll into server: The specified module could not be found.

    I think Apache too needs to be upgraded, and I don’t know how… now I’m hooked. I think I need some help!!!

  • kennysteve

    SOLVED: I mistakenly upgraded to php 5.5.28 while my apache version was 2.2.22 and the two are incompatible. Unfortunately, locating x64 version of php5.4 VC9 to remedy the situation was a nightmare. At last, I got it here: (PLEASE NOTE THAT THIS IS ONLY FOR WINDOWS7 64-bit). Thereafter, I followed all the steps in this post again and then gave myself a pat in the back…

  • Pingback: How to Upgrade PHP 5.5.12 to 5.6.12 in WampServer - BlogoSfera()

  • Hau

    Dear all,

    I have proplem, my current project using php 5.5.12 and symfony 2.1.7 but when i upgrade to php 5.6.13 then project not working. please help me resolve this proplem!

    Error content:

    public function __construct($dsn, $user = null, $password = null, array $options = null)


    parent::__construct($dsn, $user, $password, $options);

    $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array(‘DoctrineDBALDriverPDOStatement’, array()));




  • Martin

    Thanks for this! Worked great!

    Was easy to follow and understand. Upgraded from 5.5.12 to 5.6.14 🙂

  • Jwan

    I Did it. thanks to this wonderful tutorial. Great job John!

  • Jwan

    Upgraded from 5.5.12 to 5.6.15

  • Glad to hear and happy to help 🙂

  • rachit


  • Valentin Gjorgoski

    Upgraded from 5.5.12 to 7.0.0. Services won`t start. Sometimes when MySql is started Apache won`t start and when Apache is started MySql won`t.
    Previous version work fine.

  • PHP 7 is a VC14 build. The VC14 builds require you to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed. Do you have this dependency installed?

  • JA Ross

    I upgraded successfully from 5.5.12 to 7.0.0 by updating the links in the wampserver.conf (listed in step 4) file to the appropriate php7 info as well as the http.conf file (you can access by opening in wamp under apache)(noticed that the startup procedure made an incorrect reference to the php5_module to the php7.0.0 directory – be sure to change this!) by adding a php7_module with the related directory information. 🙂

  • Anil Sahu

    hii all i have upgrade php5.3 to php 5.6 but i have facing an error when i select php 5.6 version it shows error msg ie wamp icon is always orange what should i do i follow the tutorial steps

  • Hi Anil,

    PHP 5.6 is a VC11 build. I’m not positive what PHP 5.3 is, but I know it’s not VC11. Ensure you have the Visual C++ Redistributable Package for Visual Studio 2012 installed:

  • lorence

    Hello, I’m upgrading php 5.5.12 to php 7.0.1, in step 5 i removed the
    zend_extension = “c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll” in both php and phpForApache.ini file is that alright?

    and now i got stucked on step 11 because of this ( see screen shot below )

  • lorence

    those with red square icon are the dlls that php 7.0.1 doesnt have, im lost now

  • lorence

    ive tried this all many times, but apache doesnt run ;(

  • lorence

    im stuck at 10, because wamp icon’s color is orange

  • Hi Lorence,

    PHP 5.5 runs on VC11, while PHP 7 runs on VC14. So, all of your extensions will need to run on VC14 in order to work with PHP 7 and you’ll need to ensure that the Visual C++ Redistributable Package for Visual Studio 2015 is installed on your system – either 32bit or 64bit depending on which version of WAMP you are running. At the time of this comment, you’d need Xdebug 2.4.0 release candidate 3.

    As PHP 7 is very new, it’ll take the Windows world a bit of time to catch up (in a broad sense). I won’t be surprised if you run in to a few speed bumps. Let me know how things go! 🙂

  • Hey Lorence,

    Check out my reply to your comment below. Also, check your Apache logs. They’ll tell you which PHP extensions are not loading, as well as provide other useful info.

  • lorence

    can someone help me? im already trying these instruction for several hours i really messed up

  • lorence

    i already installed VC14. i just checked my regedit HKLMSOFTWAREMicrosoftVisualStudio, 14.0 is not in there, wait ill install it again

  • Lorence,

    1) Ensure all dependencies are installed (ie: VC14)
    2) Check your Apache logs
    3) Revisit the screencast and all the steps above

    If you still cannot get things up and running, I suggest you go with PHP 5.6. I’m aware it’s not the shiny new release, but it’s been around for a bit and is well supported. At the moment, no application that I know of requires PHP 7.

  • lorence

    @John Dugan:disqus can you send me a link where i can get Xdebug 2.4.0 release candidate 3?

  • lorence

    when i test port 80 in apache it says “your port 80 is not actually used”

  • lorence

    @JohnDugan:disqus hello, ive reinstalled wamp server and its dependencies
    now i got this error in logs

  • Pingback: Fatal error: Class 'NumberFormatter' not found - php()

  • Very Helpful articles on wamp server. This one made installing 5.6.18 very easy – can’t seem to get an install working with php7 as yet. Have you??

    Also have you tried wamp server 3? I’d love to see an article on that 🙂

  • Thanks Sam!

    To my knowledge their is not yet a stable build of php7 for Windows. Once their is, it’s should be pretty simple to install – same process as the steps noted in the article and screencast above + perhaps installing the VC14 redistributable package.

    I have not tried WAMP 3 yet. To be perfectly honest, I prefer not to be on the bleeding edge versions of software (as a broad general statement). Every time I have gone that route, I have ended up wasting precious time.

    Glad you found value in the post 🙂

  • Doron

    hey, can you please send me the phpForApache.ini and php.ini file for version 5.6.18?
    I tried so hard to config it.. but its not working..

  • @disqus_C8PLz7DkjS:disqus I copied mine from the existing install of php in wamp. If you still have issues I can put a link here a bit later

    @JohnDugan:disqus “I’m riding on the crest of wave” surfing the bleeding edge. I had more heart for that in my youth. I am really keen to tryout php7 though its rc1 now I think on windoze

  • Doron

    @samsherlock:disqus eventually I downloaded the last version of wamp from Sourceforge, php version is 5.6.15 but works just fine.. maybe I’ll try to add the php 5.6.18 or 7.0.3 someday but i’ts good for now =]

  • Martin


    I installed php 5.6.18 and now under that version curl is not available. All the required settings are correct. What could be wrong. Google ain’t helping out with this one 🙁

  • Martin

    Oke, I have found the problem.
    PHP 5.6+ and higher require the PHP path to be added to your Windows Path Variable under the System Variables


  • php7 on wamp with rc3 works just fine. Now compiling from git src on ubuntu 15.04, upgrading that next too

  • Sounds good:)

  • Sasa Sanjic

    Hi guys. I followed also instructions from John and finished with orange wamp status. Here is how I did solve it.
    I have added additional settings into wampserver.conf and in httpd.conf. Look inside attached pictures.

  • Sasa Sanjic

    Sorry…here are images.

  • mircea marghitas

    thank you man saved us

  • Rahul

    On windows xp this will not work as VC11 cannot be installed.

  • Kavitha


    I’m trying to upgrade my php from 5.5.12 to 5.6.20. I followed all the steps you’ve explained but still after upgrading when I check the php versions in wamp it shows 2 (i,e php version 5.5.12 and 5.6.20) but when I check php.ini file it is empty and also asks for creating few file. I Can’t switch between the php version. Where I’ve gone Wrong. Pls help.

  • Laura

    Very helpful post, helped me upgrade easily from 5.4.3 to 6.6.20. Thanks!

  • Laura

    I meant 5.6.20 of course

  • jeet


    I upgraded my Wamp PHP version from 5.3 to 5.4 but i displaying error
    Fatal error: Class ‘DateTimeImmutable’ not found

    When i am trying to upgrading from 5.3 to 5.5 its working and also not getting any error.
    Please let me know how can i debug?

    Jeet Patel

  • Hi jeet, check your logs. If you have not defined a custom log, you should find the C:wamplogsapache_error.log file helpful.

  • About time to upgrade 🙂

  • Great to hear Laura! 🙂

  • Hi Kavitha, I believe I addressed this in the screencast at the top of the article. Have a watch and let me know if you still have questions.

  • Hi John – excellent tutorial thanks! I’ve got a bit of a strange problem though…

    I’m upgrading php from 5.5.12 to 5.6.21 and have followed all the steps you gave (including adding the Windows path variable) and I have VC13 installed fine. WAMP starts up and seems to work all good – green light and no errors in the logs.

    The weird thing is that when I go to localhost wamp is telling me I’m using “PHP Version 5.6.21” but actually the Server Software says “Apache/2.4.9 (Win64) PHP/5.5.35”. When I go to phpinfo() it states version 5.5.35 at the top. Why might I be being told different versions in different places?!


  • Vishal Patel

    hey john! can you explain how can I create backup for new version php in php.ini. and hey did you notice my profile picture is of JOHN CENA so john’s fan is asking to john. please explain me so that i can be your fan.nice website.

  • Hey Vishal!

    I’m not sure I understand the question. If you are asking about creating a backup of the php.ini file that exists in the version of php you are currently running, no worries – each separate php version, along with it’s related configuration file, will be contained in it’s own directory. I went through this in the video above with regards to how the phpForApache file is symlinked. Have a look at that and let me know if you still have questions.

    If for some reason you are concerned about losing your current configuration, just copy it to a new file named php.ini.backup. Often the simplest solutions are the best 🙂

  • Tanvir Ahmad

    Big Thankkkkkkkkkkkkk yooooooooooooou , its work copy php5appach2_2.dll and 2_4.dll form php5.4.0 to 5.6.22 and restat and its work

  • oneTarek

    Many Many Thanks.
    In my case I had to keep following two line
    LoadModule php5_module “d:/wamp/bin/php/php5.3.10/php5apache2_2.dll”
    LoadModule php5_module “d:/wamp/bin/php/php5.5.37/php5apache2_4.dll”

  • oneTarek

    ohh nooooooooo.
    The green icon has gone and localhost home page is showing my new php version 5.5.37 but still I my code is getting error. Still I am unable to use new features of PHP 5.4+above.
    Seems Apache is not loading new php5apache2_4.dll file.

  • Glenn Deliquiado

    it really help. thanks i upgraded my php from 7.0.0 to 7.0.9 no problems at all

  • Pingback: How to upgrade only PHP in wamp server | kode4me()

  • Voodoo_U

    Flawless. Thanks for the guide.

  • Rageesh pk

    I have followed all the steps that you described. I want to upgrade my php version 5.3.5 to 5.5.38.
    Now my wamp server showing online but in orange colour. I cannot access my localhost and phpmyadmin.
    I think you are clear about my problem.
    Waiting for your reply.
    Thanks in advance.

  • Pingback: How To Add Php Extensions In Wamp Server | Information()

  • youssef ofattole

    good job
    it work fine i have vc 2008 2011 2013 INSTALLED

  • Pingback: How To Backup Wamp | cambodiastar()

  • Chris

    I have seen many success stories following your tutorial. Unfortunately I am having a bit of trouble adding 5.6.

    I am currently using Php 5.3 with Apache 2.2. I have downloaded the threadsafe version of VC11 x64 Php5.6.24 and installed the 64bit(VSU_4vcredist_x64.exe) and x86(VSU_4vcredist_x86.exe) versions of Visual C++ from the linked MS download page.

    I’ve copied the php.ini file and took the steps in your tutorial and video. I try to start WAMP and the MySQL starts correct but the apache fails to start. I checked the WAMP logs but it does not post there even though it is setup in the config. I checked the Windows (WIN7 BTW) Event Viewer and found the notice httpd.exe is throwing:

    The Apache service named reported the following error:
    >>> httpd.exe: Syntax error on line 127 of C:/wamp/bin/apache/apache2.2.22/conf/httpd.conf:
    Cannot load C:/wamp/bin/php/php5.6.26/php5apache2_2.dll into server:
    The specified module could not be found. .

    Now I agree with the error. php5apache2_2.dll is not part of the x64 Php5.624 package.

    Do you know a resolution to this issue? I would prefer not to have to upgrade my Apache 2.2 as I am trying to emulate a production stack we use.


  • Hi Chris,

    Apologies for the delayed response – been busy. If you were running PHP 5.3 and Apache 2.2, you are likely on a fairly old version of WAMP. Are you sure that the version of WAMP you are running is the 64-bit version? Older versions of 64-bit PHP for windows were notorious for having problems. In fact, the download page says as much (see screenshot below). I’m not even sure that PHP 5.3 offered a 64-bit version for Windows.

    Let me know if this helps. Good luck!

  • Becks

    John thank you for this clear easy to follow guide – worked a treat with no issues. Many thanks for putting it online.

  • You’re very welcome – glad it helped 🙂

  • Rayan Majed

    so everything is great however im just having one error that’s keeping my wamp orange
    (( overwritten — Unclean shutdown of previous Apache run?))
    I tried ending the process and trashing the file however this didnt work for me

    Windows 7
    Apache version 2.2.21
    php old version 5.3.10 downloading – php version 5.6.27

  • Rayan Majed

    hello @youssefofattole:disqus cant seem to find where i can download vc 2011 i have the rest.. plz can u send me a link or something !