Created
June 25, 2013 11:01
-
-
Save tsphethean/5857656 to your computer and use it in GitHub Desktop.
Rebuild a drupal 8 site after fresh pull from git.
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
#!/bin/sh | |
# Drop old DB | |
mysql -uroot -e "DROP DATABASE drupal8" | |
# Create new DB | |
mysqladmin -uroot create drupal8 | |
# Add permissions | |
mysql -uroot -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupal8.* TO 'drupal8'@'localhost' IDENTIFIED BY 'password'" | |
# Tidy up site files | |
sudo chmod a+w ~/Sites/drupal/sites/default | |
sudo rm -rf ~/Sites/drupal/sites/default/files | |
rm ~/Sites/drupal/sites/default/settings.php | |
# Create settings.php | |
chmod a+w ~/Sites/drupal/sites/default | |
mkdir ~/Sites/drupal/sites/default/files | |
chmod a+w ~/Sites/drupal/sites/default/files | |
cp ~/Sites/drupal/sites/default/default.settings.php ~/Sites/drupal/sites/default/settings.php | |
chmod a+w ~/Sites/drupal/sites/default/settings.php | |
# Site install | |
sudo -u _www drush si standard [email protected] --account-name=admin --account-pass=password --db-url=mysql://drupal8:[email protected]/drupal8 | |
sudo chmod -R 777 ./sites/default/files | |
sudo -u _www drush en simpletest -y | |
sudo -u _www drush dis overlay -y | |
sudo chmod -R 777 ./sites/default/settings.php | |
sudo chmod -R 644 ./sites/default/settings.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment