How To Install The New Drush

In order to get the newest version of drush we need to install composer gloabally. For more information use the link below.

https://getcomposer.org/doc/00-intro.md#system-requirements

To install use code below:

curl -sS https://getcomposer.org/installer | php 

You should see something like this once above command is run:

#!/usr/bin/env php this is example of very very long piece of code so thje purpose of this quote block is that the code does nto wrap it stays all on one line so it should NOT wrap. 

All settings correct for using Composer

Downloading...

Composer successfully installed to: /home/username/composer.phar

To be able to use Composer globally we should move it to /usr/local/bin/composer:

mv composer.phar /usr/local/bin/composer

Now we should be able to use Composer gloabally. To test type the command composer.

We can also add composers global bin directory to the system path with the code below:

export PATH="$HOME/.composer/vendor/bin:$PATH"

Which of the following you use depends on your user shell:

source ~/.bash_profile or ~/.bashrc or ~/.zshrc

Part 2 - Install Drush

To connect drush 7.x, which is required for Drupal 8, we need to connect drush to composer:

composer global require drush/drush:dev-master

To test and see your drush version do the command below.

drush --version

Now you should have drush up and runnning. Next we will install Drupal 7.

For more information please check out these other helpful resources.

http://www.drush.org/

https://getcomposer.org/doc/00-intro.md#system-requirements

In a Jam:

If you get the error: The program 'drush' is currently not installed. To run 'drush' please ask your administrator to install the package 'drush'

then:

  • run the above commands to install drush (will install in your home directory)
  • make an alias to drush
alias drush=‘/home/user/.composer/vendor/drush/drush’

** user is your user name