0

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

1 Answers1

1

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
Ardit Meti
  • 571
  • 5
  • 22
  • Done as said by you. In my case, the absolute drush path is C:\Documents and Settings\Extralap2\Application Data\Composer\vendor\drush\drush. But as per my original question post, in cmd I typed as d:\wamp\www\drupal71> drush cc, it shows - the same error i.e. "drush is not recognized as an internal or external command". – Niladri Banerjee - Uttarpara Sep 24 '15 at 11:38
  • 1
    check again these steps, it's not a drush problem, it's your environment variable that it's not being recognized – Ardit Meti Sep 24 '15 at 11:44
  • Its working. I closed the cmd and start again. Thanks buddy! – Niladri Banerjee - Uttarpara Sep 24 '15 at 11:49