Back to Ohmyzsh

Drush

plugins/drush/README.md

latest5.7 KB
Original Source

Drush

This plugin adds aliases and functions for Drush, a command-line shell and Unix scripting interface for Drupal. It also adds completion for the drush command.

To enable it, add drush to the plugins array in zshrc file:

zsh
plugins=(... drush)

Aliases

AliasCommandDescription
drdrushDisplay drush help
drcadrush cc all(Deprecated in Drush 8) Clear all drupal caches
drcbdrush cc block(Deprecated in Drush 8) Clear block cache
drcexdrush config:export -yExport Drupal configuration to a directory
drcgdrush cc registry(Deprecated in Drush 8) Clear registry cache
drcimdrush config:import -yImport config from a config directory
drcjdrush cc css-jsClear css-js cache
drcmdrush cc menuClear menu cache
drcmldrush cc module-listClear module-list cache
drcrdrush core-cronRun all cron hooks in all active modules for specified site
drctdrush cc theme-registryClear theme-registry cache
drcvdrush cc viewsClear views cache (make sure that the views module is enabled)
drdmpdrush drush sql-dump --ordered-dump --result-file=dumpsqlBackup database in a new dump.sql file
drfdrush featuresDisplay features status
drfrdrush features-revert -yRevert a feature module on your site
drfradrush features-revert-allRevert all enabled feature module on your site
drfudrush features-update -yUpdate a feature module on your site
drifdrush image-flush --allFlush all derived images
drpmdrush pm-list --type=moduleShow a list of available modules
drstdrush core-statusProvides a birds-eye view of the current Drupal installation, if any
drulidrush user:loginDisplay a one time login link for user ID 1, or another user
drupdrush updatedbApply any database updates required (as with running update.php)
drupsdrush updatedb-statusList any pending database updates
drvdrush versionShow drush version
drvddrush variable-delDelete a variable
drvgdrush variable-getGet a list of some or all site variables and values
drvsdrush variable-setSet a variable
drwsdrush watchdog:showShow watchdog messages
drwsedrush watchdog:show --extendedShow watchdog messages with extended information
drwstdrush watchdog:tailTail watchdog messages

Functions

  • dren: download and enable one or more extensions (modules or themes). Must be invoked with one or more parameters, e.g.: dren devel or dren devel module_filter views.

  • drf: edit drushrc, site alias, and Drupal settings.php files. Can be invoked with one or without parameters, e.g.: drf 1.

  • dris: disable one or more extensions (modules or themes). Must be invoked with one or more parameters, e.g.: dris devel or dris devel module_filter views.

  • drpu: uninstall one or more modules. Must be invoked with one or more parameters, e.g.: drpu devel or drpu devel module_filter views.

  • drnew: creates a brand new drupal website. Note: as soon as the installation is complete, drush will print a username and a random password into the terminal:

    text
    Installation complete.  User name: admin  User password: cf7t8yqNEm