How to update Drupal 8 core

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

Core updating steps

  1. Log in as admin or user with the permission "Administer software updates".
  2. Make your site in maintenance mode. Go to Administration > Configuration > Development > Maintenance mode. Check "Put site into maintenance mode" checkbox and click ‘Save Configuration’.
  3. Remove ‘core’ and ‘vendor’ directory and replace with latest files which you downloaded.
  4. Replace below files with update files.
    • autoload.php
    • composer.php
    • composer.lock
    • index.php
    • licence.txt
    • readme.txt
    • robots.txt
    • update.php
    • web.config
  5. 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;
  6. 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.
  7. Make sure that you changed $settings['update_free_access'] is FALSE in settings.php.
    $settings['update_free_access'] = FALSE
  8. Go to Administration > Reports > Status report. Verify that everything is working as expected.
  9. Make your site live, go to Administration -> Configuration -> Development -> Maintenance mode. Disable the "Put site into maintenance mode" checkbox and save the configuration.​