Makerere University

Enter a keyword or two into the search box above and click search..

Installing Drush 8

You are here

Drupal 8 development as it requires Drush 8. Using Composer is far and away the easiest method to install Drush.

First install Composer globally.

$ curl -sS | php
$ mv composer.phar /usr/local/bin/composer

Now add Composer's directory to your path by editing your .bash_profile

$ export PATH="$HOME/.composer/vendor/bin:$PATH"

Reload your terminal or just re-source the configuration you just added.

$ source ~/.bash_profile

Now that you have Composer working, you can install latest Drush. 

$ composer global require drush/drush:dev-master

At the time of writing this article, you'd get Drush 9.x with the above command. If however you'd like Drush 8, use the following:

composer global require drush/drush:8.*


You probably need to note the compatibility of Drupal versions with the Drush versions. Visit the URL below to take note:

Keep Drush up to date.

$ composer global update

Then you can check if the update has been successful by executing: (Some versions of Drush have different commands compatibility, the ones in this tutorial work with Drush 8.*

$ drush --version

Now, let’s begin with Drush. First we'll use Drush to download, install and run Drupal 8:

$ drush dl drupal 8-x --select

If you found any errors, and need to re-install Drush, try the following:

$ vim ~/.composer/composer.json  # Removed the line containing drush
$ composer global update
$ composer global require drush/drush:8.*

Sources/References & crucial links