These are the ways you could upgrade core for 7 & 8
- Take back up of files and db
- Put site in maintenance mode.
- Delete all files except the "sites" folder and any files such as ".htaccess" and "robots.txt" that have been customized.
- Download latest D7 version and upload the new files except the sites directory or the .htaccess or .robots.txt files.
- If changes have been made to robots.txt or .htaccess in the new version ensure these are incorporated into your version.
- Run Update.php by visiting yourdomain.com/update.php
- Switch off maintenance mode
- Test the site
- Put the site into maintenance mode.
- Using the shell, navigate into your Drupal installation
- If you made manual modifications to files like .htaccess, composer.json, or robots.txt, back them up and reapply after update.
- Remove core and vendor folder from Drupal core. -
rm -rf core vendor - Remove all of the files in the top-level directory, except any that you added manually. -
rm -f *.* .* - Download Drupal core (8.5.1) tar ball from drupal.org (https://www.drupal.org/project/drupal/releases/8.5.1) and replace core and vendor folder of your drupal docroot and other scaffolding files(index.php, .htaccess etc.).
- After that run https://sitename/update.php in browser or "drush updb" in command line in the docroot.
- Deactivate maintenance mode.
drush archive-dump- backup files and database.drush ups- check for updates.drush sset system.maintenance_mode 1drush cr- Clear Cachedrush up drupal- Update drupal core- If appropriate, re-apply any manual modifications to files. Such as .htaccess, composer.json, or robots.txt
- Reapply any core patches you were using before the upgrade (assuming that these haven't been merged yet).
drush sset system.maintenance_mode 0- Deactivate maintenance modedrush cr- Clear cache
composer update drupal/core --with-dependenciesdrush updatedb- Update databasedrush cr- Clear cache
known issues - https://www.drupal.org/forum/support/upgrading-drupal/2018-03-29/upgrading-from-850-to-851-using-composer