How to Upgrade PHP Version on mac

How to Upgrade PHP Version on mac

Posted on:July 16, 2019 at 10:00 AM

Hello

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.

Table of Contents

Open Table of Contents

Curl

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

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.3

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

curl -s http://php-osx.liip.ch/install.sh | bash -s force 7.3

Brew

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

Done.

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

Thanks.