PHP and WAMP logos

How to Upgrade PHP in WAMP

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.

105 thoughts on “How to Upgrade PHP in WAMP”

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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?

  7. 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?

  8. 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.

  9. 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.

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

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

  12. 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.

  13. 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???

  14. 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.

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

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

  17. 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!

  18. 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!!!

  19. 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…

  20. 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()));




  21. Thanks for this! Worked great!

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

  22. 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.

  23. 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?

  24. 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. 🙂

  25. 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

  26. 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 )

  27. 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! 🙂

  28. 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.

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

  30. 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.

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

  32. 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 🙂

  33. 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 🙂

  34. 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..

  35. @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

  36. @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 =]

  37. Hi,

    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 🙁

  38. 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.

  39. Hi,

    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.

  40. Hi

    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

  41. 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.

  42. 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?!


  43. 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.

  44. 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 🙂

  45. 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

  46. 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”

  47. 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.

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

  49. Hi,
    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.

  50. John,
    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.


  51. 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!

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

  53. 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

  54. 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 !

  55. Hey
    I did all the steps, but when I need to stop all services and select the PHP version I wish to use it doesn’t show me the latest version I added?

  56. Hi,

    I have a problem to access my local website. I have added Virtual host for my local site.

    If i uncomment virtual hosts in httpd.conf file,

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    Save it and Restart Apache, Apache gives an error “Requested operation has failed”

    If I comment the virtual hosts line,

    # Virtual hosts
    #Include conf/extra/httpd-vhosts.conf

    save the file and Start apache, it works.

    So i cannot access my local website.

    Can anyone help me with this.


  57. Hi, I’ve used this to update from PHP 5.5 to PHP 7.1, and while it works via WAMP (which now uses PHP 7.1), the Windows CMD still uses PHP 5.5. I followed the instructions to add the Windows Path Variable, but that doesn’t seem to help. Any ideas? Thanks a lot.

  58. Hello man, first you have to take some tips:

    First: if you are using the wamp64 check this out


    If Dont: c:wampbinapacheapache2.4.18binphp.ini

    There have some line that you will have to change

    extension_dir =”c:/wamp64/bin/php/php7.1.0/ext/” updated

    zend_extension =”c:/wamp64/bin/php/php7.1.0/ext/php_opcache.dll”

    Now going to you problems :

    Go to you cmd terminal (Run as ADmin)
    Digit Command:

    set PATH “C:wamp64binphpphp7.1.0”

    or if you are using wamp36bits

    set PATH “C:wampbinphpphp7.1.0”

    After that just make sure if you remove the lastates version of php from you evironment variables
    and check if its correct

    Go to: Control Panel => System => Advanced System Settings => On bottom -> Enviroment Variables

    System Variables => PATH Double click

  59. HI John,

    I have upgraded php to 7.1.3 and now I got two options in php version(5.5.12 and 7.1.3). But when I select php 7.1.3, it shows error msg and the icon is always orange not green. So could you plese help me to get out from this error.

    Thanks in advance.

  60. Hi Porygon,

    Looks like we have same php.ini file. My problem is resloved via reinstall wamp with new version, you can do a same if you don’t have important DB and you can take back up of your `www`.

    But before you can do this, you can set environment variable with you php path like “C:wamp64binphpphp7.0.10” separated by semicolon(;).(set both php version path).

    Let me know that’s work for you or not.

    Ashish Nandha.

  61. Hello, I have same problem like, 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 message ie wamp icon is always
    orange what should i do i follow the tutorial steps. Please help

  62. Hi John, Thank you for your step by step instructions.
    I have Wamp 2.5 with php 5.5.12. I copied the php 5.6.30 files as you showed. But only get the Orange button when I select the version.
    I have Visual C++ 2015 Redistributable packages installed. (In control Panel, I see 2013, 2012, 2010, 2008, 2005 versions also on my pc.)
    I still get the Orange icon. What can I do?
    Thank you

  63. Sorry did wamp server 2.4 support with php 5.6 , because I try to install it , but it not work in phpinfo

Leave a Reply

Your email address will not be published. Required fields are marked *