Install PHP 7.1 on a Mac that Still Runs OSX 10.11 El Capitan

Last Updated 26 March, 2019

Open a terminal and run. Also, everything you need to know about this package is online at

curl -s | bash -s 7.1

This package installs the PHP 7(in this case, 7.1) on OSX 10.11 (aka El Capitan) in /usr/local/php5. Yes, that looks like an odd place to install PHP 7.1, but it works.

Next, add the directory that holds the binary to your path.

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

To make this permanent, you can add export PATH=/usr/local/php5/bin:$PATH to ~/.profile and relaunch your terminal. If you happen to use iTerm 2, you may need to add this command to ~/.bash_profile instead.

Letters from Zac

Zac Vineyard

Director of Marketing Tech, NNU
Web Developer