Upgrade to PHP 7.3 or 7.2 on macOS Mojave, Sierra or on OSX 10.6 – 10.11

Posted by Prem Tiwari | Updated on

macOS Mojave ships with PHP 7.1, High Sierra 7.1,  Sierra ships with PHP 5.6, OSX 10.11 El Capitan with PHP 5.5.x, there is an easy upgrade method to either the latest PHP version 7.3 or 7.2  or you can also go back to the older stable version 5.6.

PHP versions 5.5 and older are now considered end of life, with 5.6 and version 7.1 these will be the end of life in December 2018.

With the new macOS Mojave & High Sierra they already come shipped with PHP7.1.

The latest PHP version in this guide is from this PHP Packaged site  which is being maintained for macOS and is known as a reliable source.

Download and Install PHP 7.3, 7.2, 7.1 or 7.0

Open Terminal and run…
or for 7.3

or for 7.2

or for 7.1

or for 7.0

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers