This website collects cookies to deliver better user experience
Install PHP on Mac
Install PHP on Mac
Using a Mac for the first time, I faced a problem installing PHP. I would install it over and over, and every time the terminal would tell me that I don’t have PHP on my laptop. Here are the steps I had to follow to be able to install multiple versions of PHP.
Uninstall PHP
The first step is to update brew before using it to install PHP
brew update
brew upgrade
brew cleanup
Then you need to check the current PHP installed
brew list | grep php
Then uninstall all the PHP that the grep return, here is an example :
Now you can go in the php.ini of every version and change the options you need like the memory settings, the date.timezone etc… You can find the files of each version here: