Installing Drush 4.5 or 5 on Dreamhost Using PHP CLI

There are several guides out there for running Drush on Dreamhost. Most require that you set an alias and run the drush.php file directly. However, you can do something just as easy and make it so that Drush will run via the provided shell script, which seems safer to me.

You'll want to do the following steps from the command line (skip to Step 3 if you already have Drush downloaded and just need to make it work properly):

  1. Download drush to your Dreamhost home directory:
    wget http://ftp.drupal.org/files/projects/drush-7.x-4.5.zip
  2. Unzip the file:
    unzip drush-7.x-4.5.zip
  3. Edit your ~/.bash_profile file:
    nano ~/.bash_profile
  4. Add the following line at the end:
    export DRUSH_PHP=/usr/local/php5/bin/php
  5. Optional: You can also add an alias for drush in the .bash_profile so that you run just run 'drush' at the command line without typing in the full path (IE ~/drush/drush):
    alias drush=$HOME/drush_path/drush
  6. From here you can either 'exit' and re-login or just run:
    source ~/.bash_profile
  7. Now you can run drush via the shell script:
    drush

Other Dreamhost Guides: