2

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?

closed as too broad by kiamlaluno Aug 12 at 11:48

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

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

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.*

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