Last active
August 29, 2015 14:11
-
-
Save quimic-gist/30acfe9386dcc8bcd2f0 to your computer and use it in GitHub Desktop.
Drupal: Update core if security update
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
#Put site in maintenance mode | |
drush vset maintenance_mode 1 | |
#Enable updates | |
drush en update -y | |
#run cron | |
drush cron | |
#refresh update status | |
drush rf | |
#Lists security updates | |
drush vset update_check_disabled 0 -y && drush -n -p up --security-only | |
#clear cache before backup | |
drush cc all | |
#If code is version controlled, backup db is enough | |
drush sql-dump --result-file=../before-security-update.sql --gzip | |
#If not, make full backup (code + db) | |
drush ard | |
#Now update core | |
drush up drupal | |
#Disable updates if you want | |
drush dis update -y | |
#Put site back out of maintenance | |
drush vset maintenance_mode 0 | |
#Add changed files to version control | |
git add CHANGELOG.txt | |
git add themes | |
git add modules | |
git add profiles | |
git add includes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment