Install
Tip
Drush only supports one install method. It requires that your Drupal site be built with Composer and Drush be listed as a dependency.
See the Drush 8 or Drush 9 docs for installing prior versions of Drush.
- Composer. It is required that Drupal sites be built using Composer, with Drush listed as a dependency. See recommended-project (Drush must be added). If your Composer project doesn't yet depend on Drush, run
composer require drush/drush
to add it. - Execution. Change to the project root, and call Drush via
vendor/bin/drush
. To simplify things, add./vendor/bin
to your$PATH
, allowing you to call Drush viadrush
from the project root. If you have only one Drupal codebase on your system, you may put/path/to/vendor/bin
in your$PATH
; now you can call Drush from everywhere, without having to change to project root. - Completion. Optional. Append to .bashrc or equivalent for ZSH or Fish shell. Run
drush completion --help
for more details. - Multiple Codebases. Optional. If using the bash shell, consider installing the fd project, a small set of scripts that make it easier to switch between different project directories quickly, with type completion.
Note
- 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:$PATH
drush 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+.
Drupal Compatibility¶
Drush Version | PHP Version | End Of Life | Drupal versions | 7 | 8 | 9 | 10 | 11 |
---|---|---|---|---|---|---|---|
Drush 13 | 8.3+ | TBD | ✓ 10.2+ | ✅ | |||
Drush 12 | 8.1+ | TBD | ✅ | ||||
Drush 11 | 7.4+ | Nov 2023 | ✓ | ✓ | |||
Drush 10 | 7.1+ (not 8) | Jan 2022 | ✓ | ✓ | |||
Drush 9 | 5.6+ | May 2020 | ✓ | ||||
Drush 8 | 5.4.5+ | Jan 2025 | ✅ | ✓️ | |||
Drush 7 | 5.3.0+ | Jul 2017 | ✓ | ||||
Drush 6 | 5.3.0+ | Dec 2015 | ✓ | ||||
Drush 5 | 5.2.0+ | May 2015 | ✓ |
Legend | |
---|---|
✅ | Supported and recommended |
✓ | Compatible but no longer supported |
Last update:
April 24, 2024
Authors: