Last active
August 29, 2015 14:05
-
-
Save aczietlow/49c439d4e3e81f831071 to your computer and use it in GitHub Desktop.
Reinstall local Drupal site.
This file contains hidden or 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
| #!/bin/bash | |
| # Place rebuild script in the project root. | |
| # From a terminal run '. reinstall.sh <development_database_name>' | |
| # WARNING: Will completely drop the database. | |
| cd ./www | |
| drush sql-drop -y | |
| if [ -z $1 ]; then | |
| echo 'Please provide name of database to import.' | |
| cd ../ | |
| fi | |
| #Import latest mysql dump | |
| mysql -uroot -proot $1 < <path to sql dump> | |
| drush cc all | |
| drush updb -y | |
| drush upwd admin --password=admin | |
| drush uli --uri=<local development uri> | |
| # rsync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment