Drush commands reference
Last updated by BJ___ on Wed, 2012-04-11 11:50
Run drush help [command] to view command-specific help.
Examples:
drush dl cck zen Download CCK module and Zen theme.
drush --uri=http://example.com status Show status command for the example.com multi-site.
drush help --pipe A space delimited list of commands
For details on command flags(e.g. drush sql-dump --skip-tables-key=common), see http://drush.ws/ or drush help command-name
Options:
-r <path>, --root=<path> Drupal root directory to use (default: current directory)
-l <uri> , --uri=<uri> URI of the drupal site to use (only needed in multisite environments)
-v, --verbose Display extra information about the command.
-d, --debug Display even more information, including internal messages.
-q, --quiet Hide all output
-y, --yes Assume 'yes' as answer to all prompts
-s, --simulate Simulate all relevant actions (don't actually change the system)
-i, --include A list of paths to search for drush commands
-c, --config Specify a config file to use. See example.drushrc.php
-u, --user Specify a user to login with. May be a name or a number.
-b, --backend Hide all output and return structured data (internal use only).
-p, --pipe Emit a compact representation of the command for scripting.
Commands (with shortcut in parentheses):
help Print this help message. Use --filter to limit command list to one command file (e.g. --filter=pm)
cron Run all cron hooks.
updatedb (updb) Execute the update.php process from the command line
status (st) Provides a birds-eye view of the current Drupal installation, if any.
script Run php script(s).
cache clear (cc) Clear all caches.
watchdog show (ws) Shows recent watchdog log messages. Optionally filter for a specific type.
watchdog delete (wd) Delete all messages or only those of a specified type.
sync Rsync the Drupal tree to/from another server using ssh.
eval Evaluate arbitrary php code after bootstrapping Drupal.
enable (en) Enable one or more modules.
disable (dis) Disable one or more modules.
uninstall Uninstall one or more modules.
statusmodules (sm) Show module enabled/disabled status
refresh (rf) Refresh update status information
updatecode (upc) Update your project code
update (up) Update your project code and apply any database updates required (update.php)
info Release information for a project
dl Download core Drupal and projects like CCK, Zen, etc.
test mail Run all tests and mail the results to your team.
test clean Delete leftover tables and files from prior test runs.
sql conf Print database connection details.
sql connect A string for connecting to the DB.
sql dump Exports the Drupal DB as SQL using mysqldump.
sql query (sqlq) Execute a query against the site database.
sql load Copy source database to target database.
sql cli Open a SQL command-line interface using Drupal’s credentials.
vget %var List of all variable names beginning with %var and their values.
vset %var %val Set all variables beginning with %var and set to %val.
Plug-in commands (provided by modules)
Devel Generate
generate users Creates users.
generate taxonomy Creates taxonomy.
generate content Creates content.
Module Builder
mb Generate the code for a new Drupal module, including file headers and hook implementations.
mbdl Update module_builder hook data.
mb-list List the hooks module_builder knows about.
mb-dochooks Adds comment headers to hooks that need them in the given module.
mb-docparams Adds params... WIP!
mb-debug Debug module builder. Does whatever was needed at the time.
Drush Make
make Makes a drupal site out of a makefile.
Backup and Migrate
bam-backup Backup the site's database with Backup and Migrate.
bam-restore Restore the site's database with Backup and Migrate.
bam-destinations Get a list of available destinations.
bam-sources Get a list of available sources.
bam-profiles Get a list of available settings profiles.
bam-backups Get a list of previously created backup files.
Feed API
feedapi create Creates a feed
feedapi refresh Refreshes a feed
feedapi parse Parses a feed and outputs the result to the stdout
feedapi config Shows the config of a given parser or processor
feedapi refresh Refreshes a feed
Statistics Pro
statspro aliases Presents the aliase count for today.
statspro comments Presents the created comment count for today.
statspro error Presents the errors count for today.
statspro modules Presents the installed module count for today.
statspro nodes Presents the created node count for today.
statspro node_types Presents the existent node type count for today.
statspro pi Presents the page impression count for today.
statspro sessions Presents the sessions count for today.
statspro terms Presents the taxonomy term count for today.
statspro uerror Presents the error presented to authenticated users count for today.
statspro upi Presents the page impression for authenticated users count for today.
statspro users Presents the created user count for today.
statspro uwarning Presents the wrning presented to authenticated user count for today.
statspro warning Presents the warning count for today.
Zenophile
zenophile Creates Zen subthemes quickly and easily.
zen Alias for the "zenophile" command.
Omega Tools
omega-subtheme "New Theme Name" Creates an HTML5 subtheme (new_theme_name) in the default sites/all/themes
omega-subtheme "New Theme Name" html5 Creates an HTML5 subtheme (new_theme_name) in the default sites/all/themes
omega-subtheme "New Theme Name" xhtml Creates an XHTML subtheme (new_theme_name) in the default sites/all/themes
omega-subtheme "New Theme Name" --destination=example.com Creates an HTML5 subtheme (new_theme_name) in the default sites/example.com/themes