# How to set your command line to MAMP's version Since Mac OS comes with PHP bundled, even if you have MAMP, you'll find out that you can't use MAMP's versions on the command line. This is only true if you use the free version of MAMP since MAMP pro seems to have a feature to add that to the cli automatically. ## Open your ~/.bash_profile file or ~/.zshrc if using ZSH In this file, you might see nothing or only a few configurations already. You can safely ignore them and add this lower: ```bash PHP_VERSION=$(grep "^[^#\;]" "/Applications/MAMP/conf/apache/httpd.conf" | grep "LoadModule php" | awk -F'[\/]' '{print $6}') export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH export PATH=/Applications/MAMP/Library/bin:$PATH ``` ### Note This is only working when Apache is selected in MAMP. I don't know if Nginx is setup only as a reverse proxy in MAMP, but if so it could still work for you in that case, otherwise we would have to edit the grep to find the PHP version somewhere else.