Drupal Core Update with Composer

  • Time to read less than 1 minute
Drupal 5.5.5 to Drupal 5.5.6

Using Composer to upgrade packages or libraries is fairy straight forward but updating Drupal Core with composer requires a change.

The issue lies here:

    "require": {
        ....
    },
    "replace": {
        "drupal/core": "^8.5"
    },

By Default drupal/core is inside the replace section of the composer.json file

simply move this into the require section. This will ensure that every composer update will grab the latest version.

To run the composer update simply run:

composer outdated drupal/*
composer update drupal/core --with-dependencies

This will run the updates (including the Database updates) and you will be all set.