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
- Navigate to Wamp icon in bottom right toolbar and click on it.
- Go to PHP -> Version
- You can see selected sign on current version of PHP(in our case 5.6.25).
- Click on 7.0.10
- The Wamp server will be rebooted for some time. The color of Wamp icon will be changed from red to yellow, and to green.
- Go back to PHP -> Version and you can see the sign of version has been changed to 7.0.10
- For more information you can navigate to You VirtualHost -> localhost
- The new window with WampServer information will open. You can verify what version of Apache, PHP and MySQL the system using now.
- Also there are useful installed Tools on this page, like phpinfo() or phpmyadmin
- Click on phpinfo()
- This page has full information about PHP, Apache, MySQL configuration.
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.
You did good work. I really appreciate your new and different post. Please guys keep it up and share with us some unique post in the future
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
Wow, is so easy. thank you
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)
if you need to change php in cli you only need change:
system’s PATH variable C:\wamp64\bin\php\php5.6.38 to C:\wamp64\bin\php\php7.2.10 and restart you computer.
This does not work permanently for me. When the computer is rebooted, it reverts back to the previous PHP version and everything breaks.