I am working on MAMP and I have already installed a Drupal 7 site in my local machine ( not using Drush or Composer ). Then I have installed Composer and Drush ( Installing Drush on MAMP ). Now my Drupal site is under htdocs folder and it's working. If I run "drush" from htdocs via the command line, then it's shown a bunch of help command list.

But if I am trying to install any module using drush dl Module_Name then it gives me an error like so:

[error] 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.

Can anyone tell me what the problem is? Do I need to install a fresh Drupal 7 site via Composer?

  • What do you get for drush version? It needs to be 8, not 9 for Drupal 7 – Clive Sep 13 '17 at 13:59

using composer is rather for Drupal 8 than Drupal 7 You could remove your version:

composer global remove drush/drush

and install an older one

composer global require drush/drush:8.*

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.