Drupal 8.5 is out and how to upgrade

What's new in Drupal 8.5.0?

This new version makes Media module available for all, improves migrations significantly, stabilizes the Content Moderation and Settings Tray modules, serves dynamic pages faster with BigPipe enabled by default, and introduces a new experimental entity layout user interface. The release includes several very important fixes for workflows of content translations and supports running on PHP 7.2.

If you want to read the full article on what has been introduce into Drupal 8.5, visit this link: https://www.drupal.org/blog/drupal-8-5-0

 

In this short article we'll be dealing with how to upgrade version 8.4.x to 8.5.

Before you begin, please make you are running Drupal 8.4.5

Navigate to your Drupal root directory and update your composer.json file to replace "scripts" section with the one shown below:

"scripts": {
        "pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
        "post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
        "post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
        "post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
        "drupal-phpunit-upgrade-check": "Drupal\\Core\\Composer\\Composer::upgradePHPUnit",
        "drupal-phpunit-upgrade": "@composer update phpunit/phpunit --with-dependencies --no-progress",
        "phpcs": "phpcs --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --",
        "phpcbf": "phpcbf --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --"
    },

Find the line where it says: "drupal/core": "^8.4" and replace it with:

"drupal/core": "^8.5",

Save your composer.json file

Delete your vendor directory (don't worry Composer will fetch all the components and download the vendor directory)

Type and run this command:

composer update

Depending on your server, this will take a few minutes to fetch and install all the required modules and components. It may even update some of your contrib modules as well.

Once it has completed, type and run this command:

drush updatedb && drush cr

This will update your database and clear the cache.

If successful, you should now be running Drupal 8.5 

A quick note: If you are running Page Manager you need to use the dev version and not use PHP 7.2. I have encountered some minor issue like failing to clear cache via Drupal UI. Not sure why but sticking with PHP 7.1, i had no problems at all.