Drupalcamp 2010 Drush Presntation

Preview:

DESCRIPTION

 

Citation preview

Command Line Drupal

February, 2010

DrushAndrew Riley

What is Drush?

Yes, it allows you to manipulate Drupal

without ever having to go into Drupal.

Shh, it works in windows too.

Drupal Shell

Who should use it?

Module DevelopersTheme DevelopersSite DevelopersPeople who don’t call themselves developers*

Developers

DeploymentDevelopers

Ongoing

Don’t need DrushThey can use normal DrupalThey will be envious

Content Managers

Why use it?

SpeedNormal: 5 StepsDrush: 2 Steps

200 Steps?1

ConsistancyThings are better when humans aren’t involved.2

Should you add modules in : /sites/all/modules (Possible)

/sites/default/modules (Possible) /modules (HECK NO)

It’s scriptable3

#!/usr/bin/sh rm ~/update_backup.sql.gzdrush sql dump | gzip > ~/update_backup.sql.gzdrush updatedrush cc

How to use it

Installing is easy -follow the directions

Increase your memory_limitin php.ini

drush help

HELP ME!!!!

drush download {modulename}

or

drush dl {modulename}

Example: drush download webform

Downloading

drush cache clear

or

drush cc

Clear Cache

drush cron

Run Cron

drush update

Updates your code base and runs the database update.

Updating Drupal

drush sql dump

or

drush sql dump | gzip > ~/update_backup.sql.gz

Backup your DB

drush sql load

Restore your DB

drush variable get {name}

drush variable set {name} {value}

Variable Set/Get

Modules can expand it (xmlsitemap2, sitedir_migrate, backup_migrate)

There are modules that only work with Drush (Drush Make, etc)

Extending Drush

Questions?

Andrew Riley

Associate Director of Software Development

@andrewmriley

Mindcomet