14/01/2016

Installing Drush on Windows with Composer

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"

Install Drush via Composer

In CMD type

composer global require drush/drush:7.*

Note: if you recive wget error, you need install GnuWin32 or Cygwin.

Adding Drush Folder to the System Path

  • In the "System variables" section scroll down and click on "Path"
  • Click Edit (Each location is separated by a semicolon (;).)
  • Scroll to the end of the line, add a semicolon, and paste the path there

C:/Users/[your username]/AppData/Roaming/Composer/vendor/drush/drush

(Replace "[your username]" with your user name)

Test

Open new Command Prompt and write:

composer --version

No comments:

Post a Comment