0

I have a Drupal 7 site that was not built with Composer. I have been using Drush 7 with it, but about a week ago, drush wd-show --tail stopped working, I'm not getting any output. I installed Drush 9, but I'm having difficulty configuring it.

I created an XML file, per the example., Instructions say to put aliases in $PROJECT/drush/sites/self.site.yml but I don't have a project root with a composer.json – can I get this to work without using Composer to build my site? Or is Drush 9 depending on the Drupal site using Composer?

I'm running the local version of the site in MAMP on my Mac. I created sites/drush/sites/self.site.yml – it contains:

local:
  root: /Users/pglatz/dev/wdocs/wdocs-code/www
  uri: 'https://www.whiskerdocs-local-qa.pglatz.com/'

The command I'm using is:

$ drush9 @local --alias-path=/Users/pglatz/dev/wdocs/wdocs-code/www/sites/drush/sites --root=/Users/pglatz/dev/wdocs/wdocs-code/www

When I run it, I get the error:

Command wd-show was not found. Pass --root or a @siteAlias in order to run Drupal-specific commands.

But I am passing --root and a site alias. Likely a dumb syntax error on my part, but I can't figure it out. What am I doing wrong? And how can I get Drush to be working properly again?

0

1 Answer 1

1

No. Drupal 7 requires Drush 8.

enter image description here

See https://www.drush.org/latest/install/#drupal-compatibility


Furthermore, Drush 9 can't be installed globally.

enter image description here

See https://www.drush.org/latest/install/

3
  • it seems that this information is outdated ? docs.drush.org/en/7.x/install/#pick-a-version There is says that Drush 9 is compatible with D7/D8. Or are the docs mistaken probably ? Because indeed I could not get Drush 9 work with D7 ;-)
    – Kojo
    Mar 17, 2021 at 19:09
  • 1
    @Kojo – The docs you are linking to are outdated. See drush.org/latest/install for the latest. I probably should update the links in my answer as well.
    – leymannx
    Mar 17, 2021 at 21:11
  • Oh thanks. I'm wondering why drush maintainers then don't redirect to the new docs instead of leaving wrong things around ;-)
    – Kojo
    Mar 17, 2021 at 21:13

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.