help

drush list all drush commands
drush help get help
drush help [command] help for a specific
drush [command] --help help for a specific command

site commands

drush status high level view of a Drupal instal­lation
drush si perform Drupal site instal­lation

project (modules and themes)

drush dl [project] download Drupal core or project from drupal.org
drush pml list projects (modules, themes)
drush rln [project] show project release notes
drush en [project] enable an extension
drush dis [project] disable an extension
drush pm-uni­nstall [project] uninstall an extension
 

variables

drush vget get a variable
drush vset set a variable
drush vset theme_­default [theme] set default theme
drush vset admin_­theme [theme] set admin theme

users

drush uinf [usern­ame­,ui­d,e­mail] display user inform­ation
drush upwd [username] --pass­wor­d=p­assword set password
drush uli [username] generate one-time login URL
drush ublk [usern­ame­,ui­d,e­mail] block user(s)
drush uublk [usern­ame­,ui­d,e­mail] unblock user(s)
drush ucan [username] cancel user

cache and cron

drush cc clear cache prompt
drush cc all clear all caches
drush cron execute scheduled operations

watchdog

drush wd-list show available watchdog types and severity levels
drush ws show watchdog messages
drush ws --type­="access denied­" --tail watch for failed logins
 

updating

drush upc download code updates
drush updb update database
drush up update code and database

archive and restore

drush sql-dump --resu­lt-­fil­e=../b­ack­up-­YYY­YMM­-DD.sql dump database to file
drush sql-drop drop all tables
drush sqlq --file­=../­ba­cku­p-Y­YYY­-MM­-DD.sql execute queries in a file
drush ard --dest­ina­tio­n=../b­ack­up-­YYY­Y-M­M-DD. tar create archive of entire site to a file
drush arr backup­-YY­YY-­MM-­DD.tar restore archive of entire site from file

links

project site http:/­/dr­upa­l.o­rg/­pro­jec­t/drush
project home and docume­ntation http:/­/dr­ush.org
more courses with Jon Peck http:/­/ly­nda.co­m/j­onpeck
fluxsauce http:/­/fl­uxs­auc­e.com

attribution

The content of this quick reference was released under the Attrib­uti­on-­Sha­reAlike 3.0 Unported (CC BY-SA 3.0) and is originally found in the course "­Sim­plified Drupal Sites with Drush" by Jon Peck on lynda.com.
 

Share This Cheat Sheet!

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.