enter image description hereI am trying to update Drupal core using Composer, but I am not able of doing it. I have followed a few blog posts, but nothing worked for me. This is the output of composer update drupal/core --with-dependencies. enter image description here


  • have you removed the "replace": { "drupal/core": "^8.x" }, and add "drupal/core": "~8.5" in require part of composer.json file then perform steps as described in @Jdrupal answer below – Razeem Ahmad Apr 2 '18 at 5:27
  • @RazeemAhmad yes as it can be clearly seen in my screenshot. – dejavu Apr 2 '18 at 8:51

There is some dependency changes with the new drupal version and drush but this should fix it.

composer update --with-dependencies drupal/core:~8.5 symfony/class-loader:~3.2.13 drush/drush:~9.@dev
  • I am in drupal directory and from where i could use composer to install modules. – dejavu Mar 25 '18 at 13:54
  • I have updated the answer, try to see if it works – Jdrupal Mar 25 '18 at 13:58
  • Commerce doesn’t store stuff in the vendor folder? I hope – Cyclonecode Mar 25 '18 at 18:14
  • You can try do delete the vendor folder and update again NB start by moving the vendor folder outside the webroot so it is not all gone :) – Jdrupal Mar 25 '18 at 18:15
  • OK I have updated the comment, I just saw that someone wrote that it was not a good idra to delete vendor if they used commerne :D – Jdrupal Mar 25 '18 at 18:16

Hard to say without seeing files like composer.json

I had the same error "Nothing to install or update".

Here is what I’ve done and it worked :

In composer.json :


"require": {
        "drupal/core": "~8.5"

remove if you have this :

"replace": {
    "drupal/core": "^8.x"

delete vendor folder

delete composer.lock file

Then composer update --with-dependencies

  • I have posted my JSON file screenshot... I have tried your ^8.x way but composer doesn't recognize it well. – dejavu Apr 2 '18 at 0:33

In my case I explicitly had to include webflo/drupal-core-require-dev in the update statement, as documented on the Drupal Composer template project

composer update drupal/core webflo/drupal-core-require-dev symfony/* --with-dependencies

I am currently going from 8.4.8 - 8.6.10 After successfully running these commands below from the posts above:

  1. change in composer.json:

    "require": {

      "drupal/core": "~8.6.10"    


  2. deleted vendor folder
  3. deleted composer.lock file
  4. Ran in terminal:

composer update --with-dependencies

There were no errors in the terminal - however I now had the Drupal WSOD. Checking the log files showed that there were now 2 core folders : one one in the root and one in vendor/Drupal/.

In the error.log I have the following error:

Class 'Drupal\Core\Session\AccountInterface' not found in /home/xxx/xxx/xxx/core/includes/bootstrap.inc on line 65

I don't believe this is a valid upgrade path.

It is currently recommended to use composer to update Drupal projects using the following post. https://www.jeffgeerling.com/blog/2018/converting-non-composer-drupal-codebase-use-composer


Update: I have got the upgrade working with the following steps:

Review all file permissions

deleted vendor folder

deleted composer.lock file

Update ownership - especially for sites/default/files

sudo chmod -R 777 sites/default/files

I then had to explicitly add various modules in use that wouldn't be installed update required in composer.json:

"require": {

  "composer/installers": "^1.0.24",

  "wikimedia/composer-merge-plugin": "^1.4",

  "squizlabs/php_codesniffer": "3.*",

  "drupal/flysystem": "^1.0",

  "twistor/flysystem-stream-wrapper": "^1.0",

  "drupal/flysystem_s3": "1.x-dev",

  "drupal/feeds": "^3.0",

  "drush/drush": "^9.5"


With drush installed run the following commands:

vendor/bin/drush cr

vendor/bin/drush updb

vendor/bin/drush entup

And I now have a working Drupal site from 8.4.8 to 8.6.10!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.