Contents
How can I check the version of Drush?
Cheers. If your Drush installation is not working and you have an older version of drush, then neither drush status nor drush –version will help. In that case go to the directory where drush is installed (~/.drush/drush on my system) and look at the drush.info file. There you will see a line that says version=3.0 (or whatever)
Do you need Drush to build a Drupal site?
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/drush to add it.
Which is the best version of Drush for PHP?
Drupal Compatibility Drush Version PHP Version End Of Life Drupal versions Drupal versions 7 -8.3 8.4+ 9 Drush 10 7.1+ TBD Drush 9 5.6+ May 2020 Drush 8 5.4.5+ ❶ ✅ ✅
How to call Drush from anywhere in composer?
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. 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.
Is there a version modifier for Drush 7?
Since I installed Drush version 7 globally, anytime I type “drush” without a version modifier, it will default to using Drush 7.
Is there a Drush version for Drupal 8?
Drupal 8 requires the bleeding edge version of Drush, but that version of Drush won’t work with older Drupal sites. In particular, I was running into problems trying to switch between a Drupal 6 site and the Drupal 8 site I’m trying to migrate it into.
Which is the best way to install Drush?
Composer is the recommended method of installing Drush these days, certainly for the bleeding edge version. I’ll need composer to work with Drupal 8, so this makes sense anyway.