I ran the setup:upgrade command and I'm getting the following error when I open my website

Warning: include(/var/www/html/var/view_preprocessed/html/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory

I thought this was a permissions issue but I ran chown on the entire magento folder recursively and this seems to do nothing. There are no files in the view_preprocessed folder even after running setup:upgrade and setup:di:compile so I believe that is the issue but I don't know how to solve it

1 Answer 1


Try running followings in given order.

php bin/magento setup:upgrade
rm -rf var/{cache,di,generation,page_cache,view_preprocessed}
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile

--- Update ---

Your module should be working. You can check it by removing the content area from inside the new module.

Admin: create Vendor/Module/view/adminhtml/layout/default.xml with following content.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content" remove="true"/>

Clean the cache and refresh the admin section. The main content area should not be visible. Otherwise, you have something wrong with your module. Check all file/folder name. Pay attention to the case.

  • I ran these commands and they worked but the module I was installing now shows it is enabled but doesn't show up in the admin section or under system > advanced for disable modules
    – DarthVegan
    Apr 25, 2017 at 15:16
  • Does your module listed under app/etc/config.php? Apr 25, 2017 at 15:21
  • Yes it shows up there with a 1 next to the name
    – DarthVegan
    Apr 25, 2017 at 15:25
  • I'm not seeing it in the vendor folder. I only see it under app/code/vendor_name
    – DarthVegan
    Apr 25, 2017 at 15:59
  • sorry for the confusion, replace Vendor/Module/ with your actual vendor and module name. E.g. Magento/Checkout Apr 25, 2017 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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