Using Packages

There are a few pre-packaged and pre-compiled versions of PHP for macOS. This can help in setting up a standard configuration, but if you need to have a different set of features (such as a secure server, or a different database driver), you may need to build PHP and/or your web server yourself. If you are unfamiliar with building and compiling your own software, it's worth checking whether somebody has already built a packaged version of PHP with the features you need.

The quickest way to install php on macOS is with homebrew:

  1. install homebrew, by following the instructions at »

  2. brew install php

The following alternative resources also offer easy to install packages and precompiled binaries for PHP on Mac OS:

add a note add a note

User Contributed Notes 3 notes

8 years ago
The Entropy package is no longer maintained. 

Liip supply PHP 5.3 and 5.4 packages that are easy to install.
6 years ago
Liip now supports PHP 5.5 too - - all very easy to install - just 1 command line.
raheelgup at gmail dot com
6 years ago
If you want the latest version of PHP on your MAC with Apache and MySQL as a stack you should check the AMPPS Stack :

I read about it here :
To Top