Skip to content

Instantly share code, notes, and snippets.

@aczietlow
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save aczietlow/49c439d4e3e81f831071 to your computer and use it in GitHub Desktop.

Select an option

Save aczietlow/49c439d4e3e81f831071 to your computer and use it in GitHub Desktop.
Reinstall local Drupal site.
#!/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