5 Setting up Drush
Theodotos Andreou edited this page 2018-01-16 08:48:02 +02:00

In this guide we are installing Drush, the command line interface of Drupal. According the the developers:

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

Prerequisites

Install dependencies

Run the commands as the admin user:

$ sudo apt -y install curl unzip
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Install Drush

Switch to the webadmin user:

$ sudo su - webadmin

Install Drush:

$ cd cms/
$ composer require drush/drush

Them we need to add drush in the $PATH:

$ mkdir ~/bin
$ cd ~/bin
$ ln -s ../cms/vendor/bin/drush

You can run drush to check the status of your Drupal install, with:

$ drush status

NOTE: This command must be run under the cms directory. References