Howto Install Drush on Dreamhost

August 11, 2009, 10:18 am

If you haven't used Drush before (and you build Drupal websites, Drush is "a command line shell and Unix scripting interface for Drupal". It has some amazingly useful commands for interacting with Drupal. You can do thing like:

drush dl views

And it will download and unpack the Views module into the correct folder. Then you would type:

drush enable views

And Views would be installed. Just like that. You can read the full documentation on Drupal.org.

What about using it in Dreamhost? It's a little different because at the time of this writing, Dreamhost does not default to PHP 5 on the command line and you have to specify it to look at PHP 5. Here are the steps to install it on your Dreamhost account.

  1. Download and Unpack Drush: First, you need to login to the shell of your Dreamhost account. In your home directory, download and unpack Drush. From the command line type:

    curl -O http://ftp.drupal.org/files/projects/drush-All-Versions-2.0.tar.gz

    (The latest version at the time of writing.)

    Now type:

    tar -zxf drush-All-Versions-2.0.tar.gz

    You should be left with a folder called drush that contains the drush library.

  2. Get Drush on the Commandline: Now you need to make drush available to you on the command line. Open the file called .bash_profile by typing

    nano .bash_profile

    and navigate to the bottom of the screen. Enter the following line:

    alias drush='/usr/local/php5/bin/php /home/<dreamhost username>/drush/drush.php'

    (Don't forget to replace <dreamhost username> with your Dreamhost username.) Now save the file with the keystroke CTRL + X

  3. Logout: Now type exit to logout. This will force the shell to re-read the .bash_profile file.
  4. Log Back In: Log back in and you should be ready to drush!

a million thanks!!!

a million thanks!!! considering my connection here, this will help me out a lot.

Wow, thanks so much. Very

Wow, thanks so much. Very useful.

I’ve been using Drush 3 for a

I’ve been using Drush 3 for a while now and absolutely love it.

Thanks a lot for this nice

Thanks a lot for this nice tip. Just installed drush on my dreamhost website. I will be more productive now!!

I was frustrated in my

I was frustrated in my attempts to install drush on my dreamhost site and you helped me out.
I'm really grateful to you :)

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

More information about formatting options

Flickr recent photos

rss
Dad and Me, on top of Thorong La in NepalInspecting I-5Me, taken by my son. #latergramOut in force: the slugs were paving the roads into walk this morning. #latergramBe careful out there...If you hear a bear behind you... #vacation #minigolf

User login

FriendFeed

 3 things I admire about my Dad
From FriendFeed, posted Sunday, June 16, 2013 - 09:52.
 Free wifi is that much of a lure? #portable #lcd
From Flickr, posted Tuesday, June 4, 2013 - 15:37.
 Snowy Owl at the rescue zoo.
From Flickr, posted Monday, June 3, 2013 - 16:33.
 Morning breaks from 41,000 ft above Kirkuk, Iraq.
From Flickr, posted Tuesday, May 14, 2013 - 22:54.
 Everyone. I like the signage in the Heathrow airport.
From Flickr, posted Tuesday, May 14, 2013 - 12:18.
 Spring means flowers...
From Flickr, posted Saturday, April 13, 2013 - 11:56.