Last updated September 23, 2015. Created on October 3, 2009.
Edited by hass, Manjit.Singh, SebCorbin, pkiff. Log in to edit this page.
Install Drush on Windows - The easy way.
Installing latest Drush on Windows is no more fun. Since composer is required everything has changed to the bad. The documentation on drush.org and composer is incomplete and lacks highly important requirements.
Here are the complete steps you need to take:
- Install Cygwin
- Install ncurses package. You need to select ncurses manually in cygwin setup. If you miss to install this you will get an error message that tput is missing.
- Install Git package
- Install bsdtar package or you cannot restore archives and get errors like Unable to untar and Unable to extract site archive tarball.
- Install Curl package or you cannot disable modules.
- Now install Composer for Windows globally.
- Install Drush the common way. e.g. Drush 7.x (stable):
composer global require drush/drush:7.*
NOTE: Drush cannot run with GnuWin32 as it has no sh.exe support.
Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.
Comments
Clarification
Although this is elaborated on the issue resolution - it should be clarified here also. The PATH environment variable should be assigned by going to My Computer > Right-click any blank area inside window > Properties > Advanced tab > Environment Variables > System Variables > select PATH & edit as described.
This instruction is for Windows XP SP3 32-bit.
Thank you,
Ivan
User path on Windows 8.1 not recognized in git bash window
On Windows 8.1, for reasons I don't understand, drush 6.0 installed fine via the windows installer and ran from the DOS command window, but would not run from the git bash window. Only the system path was recognized. I added the PHP path to the system path, and it work. I removed it (leaving it in the user path), and it still worked. Perhaps some odd caching??
%* works, no need for step 4
On windows XP, %* works and accept all arguments, so I'm not sure you need to put
%1 %2...
, although setting up this would limit you to 9 arguments...Works on Windows 7 Home Premium 64-bit.
Works on Windows 7 Home Premium 64-bit.
dl not working in XP SP3
I tried this
drush dl cck
i get an alert saying libssl32.dll not found
It didnt work even after installin .dll file
Windows 7 64 bits with IIS 7.5
A little variation that works for me.
1. Added path
;C:\Program Files (x86)\PHP;C:\inetpub\wwwroot\drush;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin
2. For drush.bat, keep the original. No need to change anything. Although as recommend to put the full path to php.
Drush ruless !
Due to respect to all
Due to respect to all experienced ppl, how do I copy an .exe to another .exe? I dont understand the following instruction:
Copy the file C:\Program Files\GnuWin32\bin\bsdtar.exe to C:\Program Files\GnuWin32\bin\tar.exe
???
Check out the installation
Check out the installation video mentioned above, at http://vimeo.com/15371661 , as it shows the process.
SSH needed?
It looks like I also need SSH. Can't find it within gnuwin. Any clues?
Generally speaking, you don't
Generally speaking, you don't need ssh to install drush on windows on a personal development environment such as your laptop. If you are trying to connect to a remote server, then you may need ssh, in which case you can either use PuTTY or Cygwin. You can see more information here.
If you are trying to follow these instructions on a server, you might run into a few problems because you probably won't have the permissions to install the gnuwin32 programs or alter the path variables. You'll have to talk to your hosting provider.
$ drush or $drush.bat both
$ drush or $drush.bat both work on Windows
I was under the impression that I had to call drush.bat on Windows but drush works fine as an alias
~are you netsperienced?
♥ follow me @decibelplaces ∞
has anyone had success with drush make on WAMP?
I've not been successful. there are some known issues but was hoping someone had a workaround. I'm at the point of building a virtual linux stack on my windows machine...
Drush is independent of WAMP
I have successfully installed drush on Win7, independently of my WAMP (http://www.wampserver.com/en/) installation (drush in its own directory outside WAMP and with a different version of php).
The layout is like this:
c:\wamp
e:\drush
e:\gnuwin32
e:\php <-- used with drush (zipped, not installed)
You may get warnings when using xampp
When using xampp on windows you may get warnings like "PHP Startup: Unable to load dynamic library (...)".
In this case look at the php.ini file (since xampp 1.7.1 in the xampp\php folder see: http://www.apachefriends.org/en/faq-xampp-windows.html#phpini).
I had to change the line 'extension_dir = "\xampp\php\ext"' to 'extension_dir = "E:\xampp\php\ext"' and do the same for browscap.
Do not forget the dependencies!
If you download the zip versions of the binary packages, do not forget to download the dependencies as well.
when I open the bat file I
when I open the bat file I just get @echo off
REM See http://drupal.org/node/506448 for more information.
@php.exe "%~dp0drush.php" %*
what am i supposed to do to the bat file?
Step 2?
Can someone clarify Step 2? Copy to the directory? Why is it telling us to copy to the ...exe file?
it means: Copy AND RENAME the
it means: Copy AND RENAME the file C:\Program Files\GnuWin32\bin\ bsdtar.exe to C:\Program Files\GnuWin32\bin\tar.exe
In shell scripting the copy command can also rename a file, so copying to a new filename implies renaming it.
You should learn how to use the Windows command terminal (cm d.exe)