How to install drush using composer in drupal

By gnanaguru, 19 July, 2022

Drush is scripting interface for Drupal. The best way to install drush is per-project basic.

Run composer require

In most the case, Drush can install with dev-dependency. You can run the below command in Durpal base directory

composer require --dev drush/drush

Once the drush is installed, you can navigate to below and run Drush commands.

It list Drush version.

./vendor/bin/drush --version

Tags

Comments

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.