Warning: include(/home/healthba/public_html/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory in /home/healthba/public_html/vendor/magento/framework/View/Result/Page.php on line 326

3 Answers 3


Please run the following commands in the given order and check,

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


Check to see if dev/template/minify_html is enabled and if it is, disable it.

You can check this in the admin under Stores -> Configuration -> Advance -> Developer -> Template Settings or in the core_config_table filtering by the path dev/template/minify_html.

If disabling this fixes the issue, it is very likely that there is something wrong in your custom theme.

I would carry on debugging, perhaps switch the theme to luma or blank and see if they work with minify_html enabled, etc.


Just remove var folder content by below command,

rm -rf var/generation/ var/view_preprocessed/ pub/static/frontend/ pub/static/_requirejs/ var/cache var/di var/page_cache pub/static/_cache

Now, give full permission to the var folder,

sudo chmod -R 0777 var/

If the above method is not working then check your file and folder permissions, You need to give permissions to your Magento 2 instance. Check Magento Docs for file permissions

Hope it helps.

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.