Show Menu

drush commands Cheat Sheet by FluxSauce

Quick reference guide to drush, the DRUpal SHell command line utility.

help

drushlist all drush commands
drush helpget help
drush help [command]help for a specific
drush [command] --helphelp for a specific command

site commands

drush statushigh level view of a Drupal instal­lation
drush siperform Drupal site instal­lation

project (modules and themes)

drush dl [project]download Drupal core or project from drupal.org
drush pmllist 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 vgetget a variable
drush vsetset 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­asswordset 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 ccclear cache prompt
drush cc allclear all caches
drush cronexecute scheduled operations

watchdog

drush wd-listshow available watchdog types and severity levels
drush wsshow watchdog messages
drush ws --type­="access denied­" --tailwatch for failed logins
 

updating

drush upcdownload code updates
drush updbupdate database
drush upupdate code and database

archive and restore

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

links

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.