Last active
May 4, 2020 23:15
-
-
Save ainsofs/327df51c41abb71a99e2387780825f05 to your computer and use it in GitHub Desktop.
Command lines to update Drupal
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
# ensure you have backed up the database and files before running these commands | |
# mysql/mariadb | |
drush sql-dump --gipz --result-file | |
#postgres | |
pg_dump -U postgres -h localhost "[YOUR_DATABASE]" | gzip > [dbname]-[date]00.sql.gz | |
# remove old files | |
rm -rf images/ includes/ misc/ modules/ profiles/ scripts/ themes/ | |
rm -f .* *.php *.txt *.config | |
# update with new files | |
cp -Rf drupal-7.52/* [website root]/ | |
cp -f drupal-7.52/.* [website root]/ | |
# restore backed up files eg | |
cp ~/backup/.gitignore [website root]/ | |
drush updb | |
drush updb #yes twice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment