Drush only supports one install method. It requires that your Drupal site be built with Composer and Drush be listed as a dependency.
Install a site-local Drush and Drush Launcher.¶
- It is required that Drupal sites be built using Composer, with Drush listed as a dependency. Popular starter templates for that include drupal-project (Drush is included) and recommended-project (Drush must be added). If your Composer project doesn't yet depend on Drush, run
composer require drush/drushto add it. After this step, you may call Drush via
- Optional. To be able to call
drushfrom 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.
- See Usage for details on using Drush
- To use a non-default PHP, edit ~/.bashrc so that the desired PHP is in front of your $PATH. If that is not desirable, you can change your PATH for just one request:
PATH=/path/to/php:$PATHdrush status ...`
- To use a custom php.ini for Drush requests, see this comment.
- See our guide on porting commandfiles from Drush 8 to later versions. Also note that alias and config files use a new .yml format in Drush 10+.
|Drush Version||Drush Branch||PHP||EOL||Drupal versions||6||7||-8.3||8.4+||9|
|Drush 9||9.x||5.6+||May 2020||✅|
|Drush 7||7.x||5.3.0+||Jul 2017||✓||✓|
|Drush 6||6.x||5.3.0+||Dec 2015||✓||✓|
|Drush 5||5.x||5.2.0+||May 2015||✓||✓|
|✅||Supported and recommended|
|⚠️||Supported but not recommended|
|✓||Compatible but no longer supported|
❶: EOL date for Drush 8 tbd, but estimated to be in concert with Drupal 7 EOL.