Useful Drush command

Useful Drush command

The home page of Drush https://www.drush.org

  • drush st — Checks general status of the site like DB connection, PHP version and etc.
  • drush cr — Clear all cache
  • drush uli — Gets one-time-login-link to login of the site like super admin (uid = 1)
  • drush updb — Runs updates db
  • drush sql:dump > dump.sql — Creates SQL db dump file
  • drush sql:sync @source @self --create-db — Copy the database from the site with the alias @source to the local site (Create a new database before importing the database)
  • drush en __module_name__ — Enables module
  • drush un __module_name__ — Disables module
  • drush pml --type=Module --status=enabled — Shows all enabled modules
  • drush ws — Show watchdog messages.
  • drush wd-one __WID__ — Show one watchdog log record by ID