Installing Drush by downloading directly from the GitHub Repository

You could setup the Drush on your system without using the composer. Drush 8.x comes with “dr” command that will be used to use the drush.

You have to go to their website where you will find the various options regarding the versions like Drush5,6,7,8,9 etc. Let start with the drush8.x which will support the drupal 6,7 and 8. 

http://docs.drush.org/en/master/install/

Drush Download

Click on the Drush Branch 8.x to go to the Drush 8 location. You will see the following screen.

 

Drush Download

 

Switch to Branches tab where you could see other versions of the drush. In this Branch, you could see the active Branch 8.x.

Drush Download

 

 

Click on the commit as heighlighted in above screen. You will be redirected to github website where all the source code is being managed.

Drush Download

 

Now, click on the browse files and there will be button to download the drush. Download as zip file.

Drush Download

 

Extract the downloaded zip file at appropriate location. I extracted this the following location.

Drush Directory Structure

 

Install the drush by using “composer install” command in the same folder where you extracted the composer source code.

Installing Drush

 

Set environment variable:

Now dr.bat is the drush execution file and you will be using this to work with the drush. To access this drush command on the command line interface, you have to put it on the system environment path. To do this, following are the steps for the windows.

1 – Right clieck on the This Pc or My Computer to open the properties.

Drush Setup

2 – Open the properties window. In windows 10, you could the see the following window. Here, you will see the option to open the “Advanced System Settings”, click on it.

Drush Setup

 

3 – You will see another window displaying the settings of your system.

Drush

 

4 - Then click on the button “Environment Variables”.

Drush Setup

 

5 – In User variable, select the path and click on edit button. Now, edit the path variable and add the path to this drush installation there.

Drush Setup

 

6 – Here, you could add the new path property by clicking on the “New” Button and then “Browse”.

Drush Setup

 

Now you could see the new entry for the drush path

Drush

 

Now Drush is ready to use. Test it by running the “dr” command on command prompt from any folder location. You will see some default output or the drush.

Drush Setup

Tags