Useful drush commands

  • Posted on: 5 December 2018
  • By: stillfinder

From http://docs.drush.org:

Drush is a command line shell and Unix scripting interface for Drupal. Drush core ships with lots of useful commands for interacting with code like modules/themes/profiles. Similarly, it runs update.php, executes sql queries and DB migrations, and misc utilities like run cron or clear cache.

Rebuild Drupal cache

../vendor/bin/drush -l my-site.com cache-rebuild

Reset admin password

./vendor/bin/drush -l my-site.com uli

import Drupal's configs

../vendor/bin/drush -l my-site.com cim

Export Drupal's configs

../vendor/bin/drush -l my-site.com config-export