Drupal - pm-update fails updating drupal-core and deletes everything

I was having a similar issue. I tried to run drush up drupal and it was returning Unable to load class \Drush\VersionControl\Backup. I can confirm that removing drush from my composer.json file solved this issue. My steps were: remove drush from the composer.json, run composer update and then re-run drush up drupal.

I'm also using Drupal 8.1.9. Just updated to 8.2.

Hope this also helps others.

Thanks Marco.


After some testing, I found a solution: although installing drush in the same drupal folder may work for updating single modules, it will break your site if you try to update the core.

Apparently, you should never install drush in the same folder of drupal. So the issue is solved by moving the drupal installation into ~/drupal/ and install drush into ~/.


You are using Drush 8, but your Drupal is Drupal 7. Try to use Drush 7.

Tags:

Drush