How to Upgrade PHP Version on mac

16 Jul 2019 . Php . 361 views


Recently I was facing issue to upgrade PHP version 7.3 from 7.1. Well, there are many tutorials online, unfortunately, many of them have confusing instruction. However, I come out with the easiest way to upgrade the php version from 7.1 to 7.3.

Upgrading PHP could have two possible ways, curl and brew.


If you want in curl way, then in your terminal just write this-

curl -s | bash -s 7.3

Well, in some case, you may need to use force also. It should be like this-

curl -s | bash -s force 7.3


In a second way, you need to use brew. This you need to paste in your terminal.

brew install php73

Once you have done with either one way, the next step is, you have to run the following line in your terminal.

export PATH=/usr/local/php5/bin:$PATH


It works fine in my side. It should work for you.