Question

I have installed Drush-5.4-2012-06-04-Installer-v1.0.18.msi in the location C:\ProgramData\Drush by default. I run the program and moved to drupal working directory.

When I type drush it is showing "drush is not recognized as an internal or external command " error. Do I need to configure anything before run? Please help.

Was it helpful?

Solution

You need to set the path variable :

  • right click on computer
  • go to properties
  • click advanced system settings then
  • click on environment variable, then
  • find the variable path
  • and edit it

add this to end of the variable value C:ProgramData\Propeople\Drush and restart the drush, It should work.

OTHER TIPS

Faced this problem while i was installing drush with composer.

For anyone who have installed drush with composer, if this problem occures, You will have to set PATH variable as follows.

F:\Users\{YOUR-USERNAME}\AppData\Roaming\Composer\vendor\drush\drush\;

I did this and now my path variables are below.

F:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;F:\Program Files\TortoiseSVN\bin;F:\Program Files\Git\cmd;F:\wamp\bin\php\php5.5.12;F:\ProgramData\ComposerSetup\bin;F:\Users\user\AppData\Roaming\Composer\vendor\drush\drush\;

Be careful, Just don't copy paste above variables, you have to append drush path to existing variables. enter image description here

For Drupal, you need to run composer require drush/drush command from the root project folder

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top