Beginning Drush
-
Upload
mediacurrent -
Category
Technology
-
view
1.129 -
download
0
Transcript of Beginning Drush
Getting started with DrushDownloading, installing and extending
Drupal with Drush
By Kevin BasarabMediacurrent Sr. Drupal Developer
@kbasarab
What is Drush used for?
■ Making Sandwiches■ Downloading Drupal■ Installing Drupal■ Downloading/Installing Modules■ Clearing Cache■ Generating/Using .make files■ Aliases/Sync sites■ Backup■ Update
g sandwiches
Source: http://drupal.org
Making Sandwiches
Source: http://drupal.org
Making Sandwiches
Downloading Drupaldrush dl drupal
cp -r drupal-7.14/* ./
rm -r drupal-7.14
Installing Drupaldrush si --db-url=mysql://root:@localhost/drush_demo --account-pass=test --site-name=Drush Demo
Source: http://drupal.org
Download Drupal
■ Downloading Drupaldrush dl drupal
cp -r drupal-7.14/* ./
rm -r drupal-7.14
■ Installing Drupaldrush si --db-url=mysql://root:@localhost/drush_demo --account-pass=test --site-name=Drush Demo
Source: http://drupal.org
Download Drupal
■ Downloading Drupaldrush dl drupal
cp -r drupal-7.14/* ./
rm -r drupal-7.14
■ Installing Drupaldrush si --db-url=mysql://root:@localhost/drush_demo --account-pass=test --site-name=Drush Demo
Source: http://drupal.org
Install Drupal
● Options○ --site-mail○ --db-prefix○ --db-su○ --db-su-pw
■ Downloading Drupaldrush dl drupal
cp -r drupal-7.14/* ./
rm -r drupal-7.14
■ Installing Drupaldrush si --db-url=mysql://root:@localhost/drush_demo --account-pass=test --site-name=Drush Demo
Source: http://drupal.org
Download Modules
● Options○ --site-mail○ --db-prefix○ --db-su○ --db-su-pw
■ Downloading Drupaldrush dl drupal
cp -r drupal-7.14/* ./
rm -r drupal-7.14
■ Installing Drupaldrush si --db-url=mysql://root:@localhost/drush_demo --account-pass=test --site-name=Drush Demo
Source: http://drupal.org
Enable Modules
● Options○ --site-mail○ --db-prefix○ --db-su○ --db-su-pw
Source: http://drupal.org
Clear Caches
Source: http://drupal.org
.make files
● Useful when installing same modules on multiple sites● Downloads and installs code, does not setup database● Can create from existing site using generate-makefile or build yourself
.make files
Source: http://drupal.org
.make files
● Manifest of projects
Source: http://drupal.org
Alias Files
● Manifest of projects
Source: http://drupal.org
Alias Files Usage
● Sync production, staging or dev database down to local quickly.● Push full database changes to production, staging or dev.
Source: http://drupal.org
Alias Files Usage
● Full example: http://drupal.org/node/1401522
Archive Backup
Source: http://drupal.org
MySQL Dump
● Full example: http://drupal.org/node/1401522
Update Code
Source: http://drupal.org
Update DB
● Full example: http://drupal.org/node/1401522
Bonus Round
● drush sqlc (MySQL CLI)● drush vset/drush vget (Variable set/get)● drush fu, drush fr, drush fra (Features)
Questions?