Since two weeks I have replaced my optical hard drive with an SSD for my OS and all my applications while I kept my hard drive for data. So I've installed MAMP on my SSD and my Drupal directory (workspace within Eclipse) is on the Macintosh HD.

Path to MAMP: /SSD/Applications/MAMP
Path to Drupal: /Macintosh\ HD/Users/me/Documents/workspace/drupal

I've put the drush folder /Macintosh\ HD/Users/me/Documents/workspace/drush and drush is working just fine, but for some reason, whenever I download a module by using drush, the module ends up in my homefolder while it should be using my Drupal folder I think, right?

How can I fix this and make drush work with my Drupal directory?


Try using a aliases.drushrc.php file to specify project details.

Create an aliases.drushrc.php file in one of the following places:

  1. /etc/drush
  2. $HOME/.drush

If you don't have /etc for /etc/drush perhaps it would work in: /Macintosh\ HD/Users/me/Documents/workspace/drush

aliases.drushrc.php contents

$aliases['dev'] = array(
  'uri' => 'dev.example.com',
  'root' => '/Macintosh HD/Users/me/Documents/workspace/drupal',

// or perhaps root with the escaped space char '/Macintosh\ HD/Users/me/Documents/workspace/drupal'

then from anywhere in the filesystem, you should be able to go

  • drush @dev dl views
  • drush @dev sqlc
  • drush @dev updb


Fully commented example drush aliases file here

  • Thx for the tip. I'm running my sites on localhost, so what should be the URI? I'm using MAMP, so my URL is http://localhost:8888/drupal_test/... – Michiel Jan 7 '13 at 14:18
  • 1
    In Drupal 6, your uri should be the same as it is on the live site (e.g. 'example.com'); otherwise, you may have problems. For Drupal 7 this is not an issue, so you can set your uri to something convenient for your dev site, such as 'localhost:8888'. This will allow commands such as drush uli to work correctly. – greg_1_anderson Jan 7 '13 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.