Setting up Drush on MAMP
A quick guide on how to setup drush on a local development environment using MAMP.
Drush is a command line shell and scripting interface for Drupal, designed to make life easier when working with Drupal.
Check out http://drush.ws/ the homepage for the drush project.
Step 1
Firstly, we need to download drush, which you can get from http://drupal.org/project/drush
Once downloaded and unpacked, you can basically place the drush folder anywhere on your local machine, I placed mine inside ~/Sites/drush just so I know where it is.
Step 2
Next, we need to make drush executable, so open up Terminal and issue the following command
chmod u+x ~/Sites/drush/drush
Your command could be different, depending on where you put the drush directory.
Step 3
Next, we need to add an alias in your .bash_profile, so in Terminal you can use your favourite editor, nano, pico or vi whichever you are familiar with.
Make sure you are in your home directory, you can type “cd” and press enter which will always take you back to your home directory. Then issue the following command
nano .bash_profile
Then add the following line to the end of this file.
alias drush='~/Sites/drush/drush'
Save this file and then reload your .bash_profile using the “source” command
source .bash_profile
So, we can now test to see if it has worked by typing “drush” in Terminal, if it has worked then you should see a list of drush commands, if not, then retrace the steps to check if you missed anything, otherwise, comment and I will see if I can help.
I will do some more guides on how awesome drush is later.
3 Comments
Hugh on November 28th, 2011
Thanks a bunch. This was awsome…. Now where is the drush_make tutorial?
Richard on March 4th, 2012
Thanks for this. I just got a mac and needed help learning how to set up a local dev environment then get drush to work. You made it very simple



Ice on September 20th, 2011
Is that really all there is to it because that’d be falbbegratsing.