I've been away from drupal for 2-3 years. I just came back around and installed drush via composer (like the drush site recommends) and now every time I try to use drush I get a message telling me that I should be using composer:

~/sites/d7 $ drush version
 Drush version : 9.0-dev-gd4a3872
~/sites/d7 $ drush dl drupal-7.x
 [notice] dl has been deprecated. Please build your site using Composer. Add new projects with composer require drupal/[project-name]. Use https://www.drupal.org/project/composer_generate to build a composer.json which represents the the enabled modules on your site.

I downloaded drupal 8 following these instructions for installing drupal via composer, but when I try to use drush in that project I get this message:

~/sites/cfbtv/web $ drush dl devel
This codebase is assembled with Composer instead of Drush. Use `composer update` and `composer require` instead of `drush pm-updatecode` and `drush pm-download`. You may override this error by [error]
using the --pm-force option.

Is there something wrong with my local env, or is drush a thing of the past now?


You have installed the development master branch of Drush. To continue using commands such as drush dl, drush pm-update and so on, you should install the 8.x branch of Drush.

However, your basic supposition is correct. The Drupal community is moving towards Composer and away from drush make and the drush pm-* commands. The reason for this is that more and more Drupal modules are depending on code that is distributed via Composer libraries. When using modules with Composer dependencies, the most convenient way to manage your Drupal site is through Composer. See drupal-composer/drupal-project for an example of this.

All of the other Drush commands are still relevant and remain useful.

  • Ah, thank you. There is still enough documentation by people using drush to manage D8 that it was very difficult to determine if composer was replacing drush or simply being used to install/manage drush. Anyway, this quickly rolled me back to the drush I'm familiar with: $ composer require drush/drush:8.x
    – doub1ejack
    Mar 20 '17 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.