Note

Drush 9 only supports one install method. It requires that your Drupal 8 site be built with Composer and Drush be listed as a dependency.

See the Drush 8 docs for installing prior versions of Drush.

Install a site-local Drush and Drush Launcher.

  1. It is recommended that Drupal 8 sites be built using Composer, with Drush listed as a dependency. That project already includes Drush in its composer.json. If your Composer project doesn't yet depend on Drush, run composer require drush/drush to add it. After this step, you may call Drush via vendor/bin/drush.
  2. Optional. To be able to call drush from anywhere, install the Drush Launcher. That is a small program which listens on your $PATH and hands control to a site-local Drush that is in the /vendor directory of your Composer project.
  3. Optional. Run drush init. This edits ~/.bashrc so that Drush's custom prompt and bash integration are active.

See Usage for details on using Drush.

Note

Drush 9 cannot run commandfiles from Drush 8 and below (e.g. example.drush.inc). See our guide on porting commandfiles. Also note that alias and config files use a new .yml format in Drush 9.

Drupal Compatibility

Drush Version Drush Branch PHP Drupal versions
6 7 -8.3 8.4+
Drush 9 master 5.6+
Drush 8 8.x 5.4.5+ ⚠️
Drush 7 7.x 5.3.0+
Drush 6 6.x 5.3.0+
Drush 5 5.x 5.2.0+

Legend
Supported and recommended
⚠️ Supported but not recommended
Compatible but no longer supported