Here is a complete guide to get your drush working OS X El Capitan.
1) Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
(Or use our upcoming release: wget http://files.drush.org/drush-unstable.phar)
2) Test your install.
php drush.phar core-status
3) Rename to `drush` instead of `php drush.phar`. Destination can be anywhere on $PATH.
chmod +x drush.phar sudo mv drush.phar /usr/local/bin/drush
4) Enrich the bash startup file with completion and aliases.
5) Add the following lines to .bashrc. (Check which PHP version you are using!)
export MAMP_PHP=/Applications/MAMP/bin/php/php5.6.10/bin export PATH="$MAMP_PHP:$PATH" export PATH=$PATH:/Applications/MAMP/Library/bin export PHP_OPTIONS='-d memory_limit="512M"'
6) Add the following line to .bash_profie
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
That’s it, you will have a fully functional drush on your Macintosh.