Link Search Menu Expand Document

Drush

What is drush?

It’s a command line shell and Unix interface for Drupal developers to make it easier to work on outside of browsers. The commands are interacting with code like modules/themes/profile and other command such as drush generate, drush sqlc cron and clean cache jobs etc.

Install Drush on root

Get a composer if you haven’t already

curl -sS https://getcomposer.org/installer | php
$mv composer.phar /usr/local/bin/composer
ln -s /usr/local/bin/composer /usr/bin/composer

Download drush from git repo

git clone https://github.com/drush-ops/drush.git /usr/local/src/drush

Get the latest one

cd /usr/local/src/drush git checkout master #for the latest one or whatever version you want
ln -s /usr/local/src/drush/drush /usr/bin/drush
composer install #if this results in error, run composer update to add the dependencies

Check the version

drush --version 

Have fun with drush within the folder where you installed Drupal.