How to change PHP version in WAMP

Last version of WampServer offer easy upgrade from PHP 5.x version to PHP 7.x.  Let see in details how to change PHP version in WAMP.

Assume you already using last version of Wamp server on your local machine. If not please research following resource : www.wampserver.com

  1. Navigate to Wamp icon in bottom right toolbar and click on it.
  2. Go to PHP -> Version
  3. You can see selected sign on current version of PHP(in our case 5.6.25).
  4. Click on 7.0.10
  5. The Wamp server will be rebooted for some time. The color of Wamp icon will be changed from red to yellow, and to green.
  6. Go back to PHP -> Version and you can see the sign of version has been changed to 7.0.10
  7. For more information you can navigate to You VirtualHost -> localhost
  8. The new window with WampServer information  will open. You can verify what version of Apache, PHP and MySQL the system using now.
  9. Also there are useful installed   Tools on this page, like phpinfo() or phpmyadmin
  10. Click on phpinfo()
  11. This page has full information about PHP, Apache, MySQL configuration.

 

8 thoughts on “How to change PHP version in WAMP

  1. Warning: A non-numeric value encountered in C:\xampp2\htdocs\ws-test_71\templates\as002063\includes\includes.php on line 78

    Warning: A non-numeric value encountered in C:\xampp2\htdocs\ws-test_71\modules\mod_as_menu\tmpl\styles.php on line 22

    I get the above errors when I up grade to php7.1.xx on my localhost using xampp. I have another installation of xampp running php5.6.xx with essentially the same setup and no errors.

  2. Hello
    The post is well explained and written. Each step is easy to understand. I was able to change the version to wamp. If there are more updates related to this please to do let me know. I am looking forward to more posts in future.
    Thanks

  3. How to change php version in cli :
    add [wamp-directory]\bin\php\php5.6.38 (replace with the version you want) to your system’s PATH variable.
    Alternatively, in powershell at least, you can set an alias :
    Set-Alias php56 C:\dev\wamp64\bin\php\php5.6.38\php.exe
    now you can execute this specific version with the alias. For example on my terminal, with php 7.1 in the PATH:
    >php -v
    PHP 7.1.9 (cli)
    >php56 -v
    PHP 5.6.38 (cli)

  4. This does not work permanently for me. When the computer is rebooted, it reverts back to the previous PHP version and everything breaks.

Comments are closed.