Last active
April 2, 2018 08:57
-
-
Save jvanja/08c6b4ad36b5c7425dea to your computer and use it in GitHub Desktop.
Useful Drush commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download stable Drupal | |
drush dl drupal | |
# install Drupal site with admin/admin acc | |
sudo drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://drupal7:drupal7@localhost/drupal7 | |
# clear drupal cache | |
drush cc | |
# download and enable module | |
drush dl module_name; drush en module_name | |
# delete module from the DB | |
drush sql-query "DELETE from system where type = 'module' AND name = 'module_name';" | |
# make sql dump | |
drush sql-dump --result-file=FILE_NAME.sql | |
#import sql database | |
drush sql-drop | |
drush sql-cli < my-sql-dump-file-name.sql | |
#sync databases. first create aliases at ~/.drush/ | |
drush sql-sync @from-db @to-db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment