Skip to main content

How to Install Drush

Drush is a command-line utility for advanced users administering Drupal websites.

Check the compatibility chart to see which version of Drush is right for your version of Drupal.

How to install Drush (dev-master version) on GreenGeeks

  1. Request SSH access for your account.
  2. SSH to your GreenGeeks Account.
  3. Run the following commands in this order:

Go to your home directory:

cd

Create the Drush directory:

mkdir drush

Go to the Drush directory:

cd drush

Download the Drush installer:

curl -sS https://getcomposer.org/installer | php

Install:

./composer.phar require drush/drush:dev-master

Add the alias line to the bottom of your .bashrc file:

cd
echo "alias drush='~/drush/vendor/bin/drush'" >> .bashrc

Reload your profile:

source .bashrc

To install a specific version of Drush

In this example, we’ll install version 8. The commands that are different from the above installation steps are green.

Go to your home directory:

cd

Create the Drush directory:

mkdir drush8

Go to the Drush directory:

cd drush8

Download the Drush installer:

curl -sS https://getcomposer.org/installer | php

Install:

./composer.phar require "drush/drush:8.*"

Add the alias line to the bottom of your .bashrc file:

cd
echo "alias drush8='~/drush8/vendor/bin/drush'" >> .bashrc

Reload your profile:

source .bashrc

If you encounter errors installing Drush

When you run the last command, you should see Drush running correctly. However, you may encounter shell_exec errors that our support team will need to address for you.

If you have any problems installing Drush—including any shell_exec errors—please contact our support team, and we will be happy to help. Opening a support ticket in GreenGeeks is the best way to reach us.

Was this article helpful?
Need Support?
Can't find the answer you're looking for?
Contact Support

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.