If you believe my posts will help someone please feel free to share.

Upgrading a manually installed Drupal 8.5 to 8.6.13 using Composer

I originally installed Drupal 8 for LearnAshtanga.com manually because it wasn’t really clear to me how to install Drupal core from composer.

Today I needed to upgrade from Drupal 8.5.6 to Drupal 8.6.13. I wanted to do it all through composer.

So here is how I updated my manual Drupal 8 installation using composer.

Running composer outdated only shows my modules that had updates.

Looking in my composer.json file I see why. Drupal core is not in my required sections.

I  made a backup of my composer.json

In the composer.json file under replace I remove “drupal/core”: “^8.5” so replace looks like:

I then wanted to require the latest version of Drupal , 8.6.13 so it would be in my composer.json

As it attempted to update it hit a snag. There was a dependencies on a newer version of Twig. However, composer clearly gives you this message.

So then I updated Twig via composer.

What surprised me here is that this command also initiated composer updated Drupal core as well even though Drupal was not in the require section of my composer.json.

I wanted to go ahead and clean this up. I am glad I did because apparently the last command missed a few udpates.

And now the latest Drupal core is in my composer.json

I then updated the rest of my modules

I was getting a few php-fpm 500 errors so I needed to reset php-fpm.