Search code examples
drupal-7drush

Drupal drush error


I have installed Composer on C drive (C:\Documents and Settings\All Users\Application Data). I have a drupal7 project on D drive (D:\wamp\www\drupal71).

I have installed Drush by this command: composer global require drush/drush:7.* and it successfully downloaded but skipped installing because of naming conflicts. Please see the attached screen shot.

Now when I run the drush command drush status, it shows that "drush is not recognized as an internal or external command".

Can you please guide / help me?

enter image description here


Solution

  • You have to add the PATH to your environment variables. To do this:

    1. Right-click My computer, and go to "Properties" Properties

    2. Go to Advanced System Settings

    3. In the Avanced tab, click Environment Variables
    4. At user variables for User, you should add a line to the "Path" variable ( if you don't have that already create it)
    5. You should add the absolute path where your drush file is DON'T FORGET TO PUT ";" before the other paths which may be already there.
    6. My drush file absolute path was E:/windrush/vendor/drush/drush so I added like the following pictureenter image description here