How to install Drush 8 on Ubuntu or MacOS

Submitted by phannphong on Sun, 03/17/2019 - 14:17
Drush

Following these below steps to install Drush 8 (Ubuntu and MacOS):

The current version of Drush 8 when I writing this article is 8.2.1

1. Choose the latest version of Drush 8 in the below link: 

https://github.com/drush-ops/drush/releases

You can choose v8.2.2 and download the drush.phar. You can use the bellow command line to download it:

wget https://github.com/drush-ops/drush/releases/download/8.2.1/drush.phar

Note: to use the wget command line, you need to install it first.

2. Check your drush.phar by run the below command line:

php drush.phar core-status

You will get the message like below after running the command line:

 

PHP configuration      :  <path_to>/php.ini 

PHP OS                 :  <name of PHP OS>                                     

Drush script           :  <path_to>/drush.phar               

Drush version          :  8.2.1                                    

Drush temp directory   :  <path_to>/tmp                                      

Drush configuration    :                                             

Drush alias files      :

3. Chang permission and rename to 'drush' instead of 'php drush.phar':

chmod +x drush.phar
sudo mv drush.phar /usr/local/bin/drush

 

You can use Drush 8 for now.

Reference: http://docs.drush.org/