Installing Drush on Windows

Last modified: January 9, 2010 - 23:59

The drush readme.txt file contains the basics of installing drush. Some special considerations need to be made when installing on windows. Please confirm and give feedback on this. I used the process outlined at: http://drupal.org/node/330023 and it worked for me. Here I am recreating it modifying it for drush 2

Step by Step

  1. Install the following external applications.
  2. Use bsdtar for tar. Its more reliable. Copy the file C:\Program Files\GnuWin32\bin\bsdtar.exe to C:\Program Files\GnuWin32\bin\tar.exe
  3. Set PATH environment variable to include drush, php, and binaries installed above.
    add something like this line to the end of the current value
    ;C:\php;C:\drush;C:\Program Files (x86)\GnuWin32\bin
    The semicolon separates the paths. Paths are those to: php.exe, drush.bat location,and tar/gzip/wget binaries. You will need to reopen your shell/command prompt window to have the path variables refreshed.
  4. Now you need to locate your drush.bat file which is located in the root directory of your drush module
    "C:\path-to-drush\drush.bat"
    Open this file and append the full path to the drush.php file
    c:\php\php.exe C:\drush\drush.php %1 %2 %3 %4 %5 %6 %7 %8 %9
    For drush-2.1:
    You just need to put the full path to php, no need to put the full path to drush.
    c:\php\php.exe "%~dp0drush.php" %1 %2 %3 %4 %5 %6 %7 %8 %9

Other How Tos for Installing Drush on Windows

Gotchas for Windows

Install Script

Notes below Will be converted into batch install script

# install gzip, tar, wget command line binaries
# download drush.  Using c:\drush as location in this example
# set PATH environment variables
# edit drush.bat

Above Direction Work on...

  • Windows server 2008. SP2 Tested by: johnbarclay (1/7/2010)
  • Windows server 2008. Tested by: johnbarclay (10/2/2009)
  • Windows Vista 64-bit Business. Tested by: Gman(10/20/2009)
  • Windows Vista 32-bit Business. Tested by: buckley(2010-01-10)
  • Windows XP SP3 32-bit. Tested by: phoenix(10/23/2009)
 
 

Drupal is a registered trademark of Dries Buytaert.