18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Drush Commands<br />

Chapter 15 ■ Using Drush<br />

Executing Drush commands is relatively simple and straightforward. From a terminal window or other<br />

tool that allows you to access the command line of your operating system, navigate to the document root<br />

directory of your <strong>Drupal</strong> site. To give Drush a try, from the command prompt type drush status and press<br />

Return. The output returned by Drush should look something like the following:<br />

<strong>Drupal</strong> version : 8.0-dev<br />

Site URI<br />

: http://default<br />

Database driver : mysql<br />

Database username : d8<br />

Database name : d8<br />

Database<br />

: Connected<br />

<strong>Drupal</strong> bootstrap : Successful<br />

<strong>Drupal</strong> user<br />

: Anonymous<br />

Default theme : bartik<br />

Administration : seven<br />

theme<br />

PHP executable : /usr/bin/php<br />

PHP configuration :<br />

PHP OS<br />

: Darwin<br />

Drush version : 7.0-dev<br />

Drush configuration :<br />

Drush alias files :<br />

<strong>Drupal</strong> root<br />

: /Applications/MAMP/htdocs/d8<br />

Site path<br />

: sites/default<br />

File directory path : sites/default/files<br />

Temporary file : /Applications/MAMP/tmp/php<br />

directory path<br />

Active config path : sites/default/files/config_lFEpXnCuJgRcTN0kwUlVqp7FAr<br />

JU7Cj4s2AbZN9Fg6W22BksQHWkPzhJGqU4cfs0Ix2UD7YEqg/active<br />

Staging config path : sites/default/files/config_lFEpXnCuJgRcTN0kwUlVqp7FAr<br />

JU7Cj4s2AbZN9Fg6W22BksQHWkPzhJGqU4cfs0Ix2UD7YEqg/staging<br />

The status command returns a list of helpful information about your current <strong>Drupal</strong> 8 installation.<br />

Another key example is to download a module or theme using the drush pm-download command:<br />

drush pm-download calendar<br />

This command would download the latest production version of the Calendar module to your site.<br />

There is also a shortened version of the command, drush dl calendar.<br />

To enable the Calendar module (for example) from the command line, you would execute<br />

drush pm-enable calendar<br />

or the shortened version, drush en calendar.<br />

171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!