Question

I upgraded my 2.1.0 store from the Admin and the console stated it completed successfully. However my Admin and frontend are now displaying the following error:

Fatal error: Uncaught exception 'Magento\Framework\Exception\FileSystemException' with message 'The file "/home/extende/public_html/var/generation/Magento/Theme/Model/ResourceModel/Design/Config/CollectionFactory.php" cannot be deleted Warning!unlink(/home/extende/public_html/var/generation/Magento/Theme/Model/ResourceModel/Design/Config/CollectionFactory.php): Permission denied' in /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php:382 Stack trace: #0 /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/home/extende/p...') #1 /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/home/extende/p...') #2 /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/home/extende/p...') #3 /home/extende/public_html/vendor/magento/framework/Filesy in /home/extende/public_html/vendor/magento/framework/Filesystem/Driver/File.php on line 382

Was it helpful?

Solution

I would recommend the composer way to install and upgrade Magento 2. It seems to be a problem with di:compile.

Go to your console and do the following:

rm -Rf vendor
rm -Rf pub/static/*
rm -Rf var/generation/*
rm -Rf var/cache/*
composer install
composer update
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy

These commands will delete every generic data and compile them again. If there were any problems while updating magento, you will see them while downloading your dependencies via composer.

Please be careful with the rm -Rf commands and never delete any .htaccess-File.

Hope this will help.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top