Drush: Drush Commands Not Found Drupal 8

When working in Drupal 8, after installing Composer, and then you type "composer require drush/drush" in hope to install drush at the root of verdor/bin folder. Surprisingly after Composer shows Drush 9 has been installed and you try to type "drush status" and the error comes up that "drush commands is not known";

  1. Make sure you uninstall Composer that might be installed on a global level with this command: sudo apt-get remove composer. Make sure when running this command you are at the root level of Ubuntu Operating System by first running "cd /"
  2. After Composer has been removed, navigate to Drupal vendor/bin and run these commands: "sudo apt-get install composer", after Composer has been installed, run this command "composer require drush/drush" and Drush will be installed in the root level. 

Edit this Article
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy