Recommended and simple way to install and use Drush 12.x for Drupal 10

install and use Drush 12.x for Drupal 10

This is the best and recommended method to install and use drush for your drupal installation.

  • It does not require any root privileges.
  • It will not affect any other drupal installations
  • No need install Drush globally.

Make sure you have already installed composer.

In the root of your Drupal Project run the following command to require the dependency. This command will automatically include the latest drush version for your Drupal project.

composer require drush/drush

Then use drush as like below from your project root, for example running cron via drush

php vendor/drush/bin cron

Optional step to use ‘drush’ as a simple command (Not recommended for Multi-installation of Drupal / Shared Server):

Add /vendor/bin directory to your $PATH variable.

Please follow and like us:

Recommended Articles

Leave a Reply

Your email address will not be published. Required fields are marked *