Popular Drush commands

5 views
Skip to first unread message

Wei dai

unread,
Oct 14, 2011, 2:13:15 AM10/14/11
to Bysoft CMS
These Drush commands that can be used on a frequent basis. Navigate to
http://drupal.org/node/477684 to see the full list of Drush
commands.


cache clear (cc): Clear all Drupal caches or a specific cache.

cron: Run all cron hooks.

disable (dis): Disable one or more modules or themes.

download (dl): Download core and contributed modules and themes; this
is great when used in parallel with Drush Make.

enable (en): Enable one or more modules or themes; this is great when
used in parallel with Drush Make.

statusmodules (sm): Print a list of all available modules and themes.

status: Prints status information about the Drupal site, such as
Drupal version, site path, database username/password, and so on.

sql cli (sqlc): Open a SQL command-line interface using the site s
database user name and password.

sql dump: Export the Drupal database using mysqldump.

sql sync: Copy a source database to a target database using rsync;
this is great when used to push staging sites from one location to
another.

uninstall: Uninstall one or more modules.

update (up): Update contributed modules and apply database updates
(that is, run update.php); this works with many file versioning
systems.

updatecode (upc): Update project code without applying database
updates.

updatedb (updb): Run the update.php script from the command line; note
that you may need to use the batch-process command to make this work
(see http://drupal.org/node/873132).

variable delete (vdel): Delete a variable.

variable get (vget): List all or some site variables.

variables set (vset): Set a variable.

watchdog delete (wd-del): Delete watchdog messages, also known as
status messages.

watchdog list (wdlist): Show all available status messages.

bam backup: This requires the backup_migrate module; it backs up the
site s database.

bam restore: Requires the backup_migrate module; it restores the site
s database.

bam backups: Print a list of previously created backup files.

Jent Zheng

unread,
Oct 14, 2011, 2:26:47 AM10/14/11
to Bysoft CMS
For the SQL sync, you can take a look at my drupal site alias example,
try it yourself and have fun~
https://github.com/jentwest/Drush/blob/master/aliases.drushrc.php
Reply all
Reply to author
Forward
0 new messages