Show Menu

drush commands Cheat Sheet by

Quick reference guide to drush, the DRUpal SHell command line utility.
php     development     cms     web     intermediate     drupal     drush

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
project home and docume­ntation
more courses with Jon Peck
fluxsauce

attrib­ution

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.

Download the drush commands Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/fluxsauce_drush-commands.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

Like this cheat sheet? Check out our favourite related books!

Head First PHP & MySQL
"Heads First PHP and MySQL is a great beginners book, one that should be on the bookshelf of every up and coming PHP developer."

PHP & MySQL: Novice to Ninja
"Quite honestly, this book PHP & MySQL: Novice to Ninja went beyond my expectations. Overall Rating: Great Book!!"

PHP Objects, Patterns, and Practice
"This is an amazing book. I made the switch to OO PHP about a year ago, and I am learning something new every time I open this book."

 

Comments

Great tool... thanks! Great tool... thanks!, 15:08 18 Dec 14

There are a lot of these out there, but this one has a filter which is great. One thing that I noticed is that update password command needs to have quotes (at least when the password contains special charaacters). For example, drush upwd admin --password="admin's_password"

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          PHP Cheat Sheet
          Modules and Themes Listed in Drupal User's Guide Cheat Sheet
          PHP-FIG PSR Standards Cheat Sheet