Cheatography
https://cheatography.com
Quick reference guide to drush, the DRUpal SHell command line utility.
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 installation |
drush si |
perform Drupal site installation |
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-uninstall [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 [username,uid,email] |
display user information |
drush upwd [username] --password=password |
set password |
drush uli [username] |
generate one-time login URL |
drush ublk [username,uid,email] |
block user(s) |
drush uublk [username,uid,email] |
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 --result-file=../backup-YYYYMM-DD.sql |
dump database to file |
drush sql-drop |
drop all tables |
drush sqlq --file=../backup-YYYY-MM-DD.sql |
execute queries in a file |
drush ard --destination=../backup-YYYY-MM-DD. tar |
create archive of entire site to a file |
drush arr backup-YYYY-MM-DD.tar |
restore archive of entire site from file |
links
project site |
|
project home and documentation |
|
more courses with Jon Peck |
|
fluxsauce |
|
attribution
The content of this quick reference was released under the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) and is originally found in the course "Simplified Drupal Sites with Drush" by Jon Peck on lynda.com. |
|
Created By
https://about.me/jonpeck
Metadata
Favourited By
Comments
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
Related Cheat Sheets