How to update Drupal to the latest version

drupalOf course it's important to use the latest stable versions of website software, to minimise the opportunities for being hacked.  This article describes how to update Drupal.


Updating vs Upgrading

This article is for an update of a minor version (e.g. 8.x.x to 8.x.x) rather than an upgrade to a major version (e.g. 7 to 8).

 

Backup

Before doing any major work, including updates, you should back up your Drupal website. You should also make a separate copy of the /sites/default/settings.php file.

 

Download

Start by logging on to your website with an admin account.

  1. Go to Manage > Reports.
  2. Click Available Updates.
  3. If an update is available for Drupal Core, you might see something like the following

Drupal core 8.3.2
Security update:     8.3.4 (2017-Jun-21)
Download
Release notes
Includes: Activity Tracker, Aggregator, Automated Cron, Ban, Bartik, Block, Book, Breakpoint, CKEditor, Classy, Color, Comment, Configuration Manager, Contact, Contextual Links, Custom Block, Custom Menu Links, Database Logging, Datetime, Field, Field UI, File, Filter, Forum, Help, History, Image, Internal Dynamic Page Cache, Internal Page Cache, Link, Menu UI, Node, Options, Path, Quick Edit, RDF, Responsive Image, Search, Seven, Shortcut, Stable, Standard, Stark, Statistics, System, Taxonomy, Telephone, Text, Text Editor, Toolbar, Tour, Update Manager, User, Views, Views UI

From here you can click the Download link, to download the latest version of Drupal (e.g. 8.3.4).

 

Update

Start by putting your site into Maintenance mode.

  1. Upload and extract the latest version.
  2. Copy the extracted contents into the root directory of your site.
  3. Browse to http://yoursite.com/update.php
  4. Click Continue to update the database.

Your site should now be updated to the latest version.  You might need to restore your settings.php file, or even parts of this file.  However when I performed this update, no further editing was required.

 

Thanks for visiting.