Daily Use Drush commands for Drupal 8
Drush is used to perform some admin tasks from CLI , Drush command are different for drupal 7 & Drupal 8 versions,
Here I am Providing some most used drush commands for daily use. If you have more of them that you use regularly in your project, please put them in the comments, as I would love to add them to the list.
sudo apt-get install drushor follow any other article to install it.
Drush Command | Usage |
---|---|
drush cr | cache rebuild to drupal |
drush dl {module_name} or {theme_name} | to download the drupal module and themes |
drush en {module_name} or {theme_name} | to enable the downloaded module and themes |
drush upwd --password="NewPassword" admin | update the password of user admin |
drush sql-cli < ~/my-sql-dump-file-name.sql | Import database in drupal project |
drush sql-dump > ~/my-sql-dump-file-name.sql | Export database in drupal project |
drush pm-uninstall {module_name} | uninstall drupal module from drupal |
drush pm-list | Drupal Module list |
drush config-set system.theme default {theme_name} | Set default drupal theme |
drush config-set system.theme admin {theme_name} | Set admin drupal theme |
1 -
cd
Good info
ReplyDelete