Skip to content

Instantly share code, notes, and snippets.

@jvanja
Last active April 2, 2018 08:57
Show Gist options
  • Save jvanja/08c6b4ad36b5c7425dea to your computer and use it in GitHub Desktop.
Save jvanja/08c6b4ad36b5c7425dea to your computer and use it in GitHub Desktop.
Useful Drush commands
# 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