Drush Installation
Introduction
Drush is a command line shell and Unix scripting interface for Drupal. Drush core ships with lots of useful commands for interacting with code like modules/themes/profiles. Similarly, it runs update.php, executes sql queries and DB migrations, and misc utilities like run cron or clear cache. Drush can be extended by 3rd party commandfiles.
Install a site-local Drush
In addition to the global Drush, it is recommended that Drupal 8 sites be built using Composer, with Drush listed as a dependency.
- When you run
drush
, the global Drush is called first and then hands execution to the site-local Drush. This gives you the convenience of runningdrush
without specifying the full path to the executable, without sacrificing the safety provided by a site-local Drush. - Optional: Copy the examples/drush.wrapper file to your project root and modify to taste. This is a handy launcher script; add --local here to turn off all global configuration locations, and maintain consistency over configuration/aliases/commandfiles for your team.
- Note that if you have multiple Drupal sites on your system, it is possible to use a different version of Drush with each one.
Drupal Compatibility
Drush Version | Drush Branch | PHP | Compatible Drupal versions | Code Style | Isolation Tests | Functional Tests |
---|---|---|---|---|---|---|
Drush 9 | master | 5.6+ | D8.4+ | |||
Drush 8 | 8.x | 5.4.5+ | D6, D7, D8.3- | - | ||
Drush 7 | 7.x | 5.3.0+ | D6, D7 | Unsupported | ||
Drush 6 | 6.x | 5.3.0+ | D6, D7 | Unsupported | ||
Drush 5 | 5.x | 5.2.0+ | D6, D7 | Unsupported |
As from Drupal 8, drush become a must in some of the updates, and in some system failures after update.
Drush is a must have tool, and should be installed on every account.
Drush Commands for Drush 8x
Here you will find drush commands on:
- drush-9x
- drush-8x
- drush-7x
- drush-6x
On the left hand side you will have all the drush commands with all their details, simply click on a command and you will be takeb to its page.
If there's anything missing please feel free to let us know and will do our best to add it asap.
read more at drush reference