I thought I needed PHP version 7 for our machine running OS X Server and used the following steps successfully:
1. Launch Terminal.app and execute the following commands:
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0
sudo pico /Library/Server/Web/Config/apache2/httpd_server_app.conf
2. Search (control-w) for “php5_module” (for my system, it was line 184 – press control-c to see the line number in pico) and make these changes:
#Comment out the PHP5 module
#LoadModule php5_module libexec/apache2/libphp5.so
#Enable PHP 7 module
LoadModule php7_module /usr/local/php5-7.0.0RC8-20151127-210333/libphp7.so
LoadModule php7_module /usr/local/php5-7.0.10-20160831-102733/libphp7.so
Search (control-w) for “FilesMatch” (for my system, it was line 292) and paste in:
SetHandler application/x-httpd-php
3. Execute the following commands in Terminal.app to see your changes live:
sudo apachectl restart
php -version
So far PHP 7 seems to be compatible with other services that rely on PHP, so that’s good…
** UPDATE 6-12-2020 **
php 7.0.10 ran on my macOS Server, now running High Sierra, until today when WordPress reminded me this version of php is out of date. For those updating to php 7.3.8, check out my updated post.







