Install and Update Drush on Linux

Submitted by editor on Sun, 05/08/2016 - 13:53
Question

Install and Update Drush on Linux

# Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
php -r "readfile('http://files.drush.org/drush.phar');" > drush
# Or use our upcoming release: php -r "readfile('http://files.drush.org/drush-unstable.phar');" > drush

# Test your install.
php drush core-status

# Make `drush` executable as a command from anywhere. Destination can be anywhere on $PATH.
chmod +x drush
sudo mv drush /usr/local/bin

# Optional. Enrich the bash startup file with completion and aliases.
drush init

 

Aa a script: (Run sudo a command first, like sudo ls)

php -r "readfile('http://files.drush.org/drush.phar');" > drush
chmod +x drush
sudo mv drush /usr/local/bin
drush init

 

Update drush (or also install)

sudo php -r "readfile('http://files.drush.org/drush.phar');" > /usr/local/bin/drush
chmod +x /usr/local/bin/drush
drush init

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.