Magento 2 Theme layout xml not working - How to fix!

Posted on April 06, 2020 | Magento 2

A possible reason your layout xml is not updating on the frontend is because Magento 2 has switched your theme from a Physical Theme to a Virtual Theme.

This can happen when using version control such as Git. What happens is you load the frontend and Magento cannot find theme files so it assumes it's a virtual theme and no longer renders layout xml.

To fix this issue, log onto PhpMyAdmin or your mysql admin tool of choice.

Go to the Theme table and find your theme.

You'll notice Type is set to 1.


Change to 0.


Next, clear your cache/static files :

php bin/magento cache:flush && rm -rf pub/static/* && php -f bin/magento indexer:reindex

Load the frontend, and it should now read your theme's layout xml.