Install Drush for Drupal 7 sites

If you’re migrating sites from Drupal 7 upwards, you will need Drush installed! Here’s a quick guide on how to do that, using the linux command line. This assumes that you don’t want to install Drush globally, so we’ll install it in our local directory (home)

  1. Find the latest version of Drush 8 on their repo – at time of writing 8.4.10. Right click the asset to get a downloadable URL and copy it.
  2. Login and create a bin directory in your home directory
    • cd
    • mkdir bin
  3. Change to that directory and download drush, renaming the file so we don’t need to alias it
    • cd bin
    • wget [paste your URL here] e.g. https://github.com/drush-ops/drush/releases/download/8.4.10/drush.phar
    • mv drush.phar drush
  4. If you’re using debian you likely already have a $HOME/bin directory in your path, but check this in your .profile or .bashrc, add it if missing
  5. Test it by logging out, then back in, and typing ‘drush’ in your command line
  6. Profit!

Blog Tags: DrushDrupal7