Ayesh Karunaratne: Full-time traveler, freelance software architect and security researcher
Tue, 2016-07-12 01:56
OK. This is not exactly a step-by-step guide to install. It is not, because you do not need a "guide" or an "installer" to install Drush 8 (or 7 for that matter) anymore.
There used to be Drush install packages, and you had to make some changes here and there to get Drush working. This assumes you already have a working PHP and MySQL setup. If you do not, I can recommend Laragon because it comes with multiple PHP versions, MariaDB, several PHP extensions including opcache, etc. Note that Laragon comes with several other tools too, including Composer, a mail catcher, git, etc.
You need Composer already installed. If you do not already have it, head over to GetComposer, download the Windows installer, and install it. You could also manually install it but the self-install works fine.
This step only applies if you have not already installed Composer, and the composer installation folder's vendor/bin folder is not already in your operating systems PATH variable. There are plenty of posts about that, this one comes very detailed.
This is the actual part you are probably looking for. Open your favorite shell (cmd, Git's bash, etc), and type this:
composer global require drush/drush:8.*
This will install Drush version 8, which is compatible with all three latest Drupal versions.
If you have a cygwin environment from git bash, you can type
which drush to find out the installation path. You do not have to add this new folder to your system PATH, because you have already added the parent folder.
See it working: