docs:drupal:upgrading

Upgrading Drupal (zip file method)

These instructions are specific to when you have a live site, a development machine, and both are set up for git push/pull

Several places below reference running update.php. This means going to your yoursite.com/update.php after logging in as an administrator. If you are unable to log in, you can force access to update.php by editing the settings.php file in drupal/sites/yoursite/settings.php and set the following line to true (don't forget to change it back after updates are complete)

$update_free_access = FALSE;

change to:

$update_free_access = TRUE;
  • dev machine must connect to its own database, and not the live site database
  • working copy must be clean (no outstanding changes)
  • sync both your dev drupal database and all files with the live site, if you haven't already
  • download latest drupal core zip file to dev machine and extract
  • put your dev machine working copy drupal in maintenance mode by logging in (STAY LOGGED IN FOR THE FOLLOWING STEPS)
  • in your working copy drupal, delete all files and folders inside drupal EXCEPT for .git and sites/
  • copy all files from extracted drupal core EXCEPT sites/ folder into your working copy where you just deleted some
  • fix .htaccess, .gitignore, and any other files modified by us in Core (you should be using git to track things like this)
  • go back to the drupal administration pages on your dev machine and run update.php
  • if no errors are detected, continue testing your site to make sure everything in your site AND with your modules are still working
  • if everything is ok, make a git commit with all changes for Core updates (you can start a new branch if you prefer)
  • you can either manually download and replace module files or use the Update module for some, if they support it
  • after updating desired modules, run update.php
  • if no errors are detected, continue testing your site to make sure everything in your site AND with your modules are still working
  • if everything is ok, make a git commit with all changes for Module updates (you can start a new branch if you prefer)
  • perform each of the above sections first
  • for all sites ran by this drupal instance, backup database and drupal directories, including sites directory
  • make sure dev machine git commits have been pushed to shared repo
  • log into live site and place it in maintenance mode
  • pull git changes from shared repo
  • run update.php
  • take site out of maintenance mode
  • flush all caches just for good measure
  • docs/drupal/upgrading.txt
  • Last modified: 2016/08/05 15:58
  • by billh