How to update Drupal 8.x.x version to any latest Drupal 8.x.x version (for example, Drupal 8.1 to 8.2). Security updates also includes in Drupal core release which really helps to protect your website.
Before updating core
- Always take a backup of your files and database before updating core.
- Download latest version of Drupal core from drupal.org (https://www.drupal.org/project/drupal) and extract it.
Core updating steps
- Log in as admin or user with the permission "Administer software updates".
- Make your site in maintenance mode. Go to Administration > Configuration > Development > Maintenance mode. Check "Put site into maintenance mode" checkbox and click ‘Save Configuration’.
- Remove ‘core’ and ‘vendor’ directory and replace with latest files which you downloaded.
- Replace below files with update files.
- autoload.php
- composer.php
- composer.lock
- index.php
- licence.txt
- readme.txt
- robots.txt
- update.php
- web.config
- Enable core update access in settings.php
- Open settings.php with a text editor.
- Find the line that says:
-
$settings['update_free_access'] = FALSE;
- Change it into:
-
$settings['update_free_access'] = TRUE;
- Run update.php by visiting http://www.domain.com/update.php (replace www.domain.com with your domain name). This will update the core database tables.
- Make sure that you changed $settings['update_free_access'] is FALSE in settings.php.
$settings['update_free_access'] = FALSE
- Go to Administration > Reports > Status report. Verify that everything is working as expected.
- Make your site live, go to Administration -> Configuration -> Development -> Maintenance mode. Disable the "Put site into maintenance mode" checkbox and save the configuration.