Skip to content

Magento 2 composer update removes pub/media and all other important folders

After running composer update, composer starts upgrading and downloading.

After that the update of packages are marked red “Update of name/module_name failed”.

And all my important folders and files (bin,vendor, ..) are empty or gone.

Does anybody know what can have caused this unwanted behaviour? I managed to recover the files from backup, but it took me quite some time.

enter image description here