Install php mcrypt in Mac OS Sierra 10.12

# Install HomeBrew. (
$/usr/bin/ruby -e "$(curl -fsSL"

Disable SIP in Mac OS. (

The Sierra version ships with PHP 5.6.28 at the time of writing, you can always find the version  from your terminal with php -v command. 

Download the version source from the PHP site ( and extract it.

Make sure you enable PHP extension in apache conf and mcrypt extension in /etc/php.ini and it should all be good to go! Reenable SIP as its recommended.


Leave a Reply