Upgrade my PHP version

on Linux and MacOS

In 99% after download and install your new PHP version you will need to change your environment variable in order to switch on your new version. To do so, open a terminal and tap:

(if you don't know how to use vi --> click here)

vi ~/.bash_profile

Tap i to insert and then paste this line with your new PHP version,

export $PATH

Of course, if you already did the sane action for an older version you need to remove the old lines in this file (tap 'dd' to remove a line with vi).

In this example I have the PHP-version 7.1.13, to get your, you can tap in another terminal this command and see which version you want to implement:

ls /usr/local

Finally, press ESC and ZZ (MAJ + ZZ), it will save your modification.

Restart you computer and that's it ! To double-check go to how to found my PHP version.



Wrote by Raspaud Alexandre at June 6 2018, contact alexandre.raspaud@gmail.com.