Устанавливаем Drush на Windows

1Установка  Cygwin

  1. 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.
  2. Install Git package
  3. Install bsdtar package or you cannot restore archives and get errors like Unable to untar and Unable to extract site archive tarball.
  4. Install Curl package or you cannot disable modules.

2 Now install Composer for Windows globally.

Install Composer for Windows

Let's start out by install Composer for Windows.

  • Go to getcomposer.org/download
  • Scroll down and click on "Composer-Setup.exe"
  • Save the file, or just click "Run"
  • Click "Next"
  • Click "Next"

Now, we need to tell Composer where php is installed. This will be different based on whether you're using Wamp, Xampp, etc. I have Wamp installed so mine is at: C:\wamp\bin\php\php5.5.12\php.exe

  • Browse to C:\wamp\bin\php\php5.5.12\php.exe
  • Click "Next"
  • Click "Install"
  • Click "Next"
  • Click "Finish"

Now, when I open a Git bash, and type "composer --version" and press Enter, we'll see that I have version 1.0-dev installed!

Install Drush via Composer

Now, we're ready to install Drush with composer. It's pretty simple. In fact, it's a single line in the command line.

  • In the Git Bash, type "composer global require drush/drush:7.*" and press Enter.

This will install Drush to "C:/Users/[user name]/AppData/Roaming/Composer/vendor/drush/drush"

We can't run it from anywhere else though, so we need to add that path to our Environment Variables.