I have removed the CSS in default_head_blocks.xml successfully like this:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <css src="css/test.css" />
        <remove src="css/styles-m.css" />
        <remove src="css/styles-l.css" media="screen and (min-width: 768px)"/>
        <remove src="css/print.css" media="print" />

Now I made some changes on CSS. After I turn all back as it was before it shows me Lumina CSS and it also ignores changes I made in default.xml. Before it works all, but now my changes in this Folder are ignored:

Theme > Magento_Theme > layout

I have no idea why

3 Answers 3


I have been having exactly the same issue in Magento 2 Ver 2.2.4. However, for anyone arriving here having this problem, it is likely that your theme has a setting of 'virtual' in the database.

In the database, examine the 'theme' table, column 'type', if your theme it has a value of 1, the theme is 'virtual' and changes to your default_head_blocks.xml will be ignore. Change the setting to 0 clear the Magento 'var' folder and your changes should now be shown.

This solution can be seen here.


The only way I found to solve the problem was duplicate the theme and give it a new name. Then use the new theme and it works.

  • I ran into the problem after migrating a shop to another webspace. I still don't know where the actual problem was but your workaround did it for me as well.
    – Jey DWork
    May 19, 2016 at 19:30

I just experienced this same problem but I found it ridiculous to have to remove the theme and add it again. So my default.xml seemed to be ignored, so I renamed the layout folder to see if that would change anything; it broke everything. Okay, so the layout folder is read and used by Magento, why wouldn't the default? I emptied the file and started from scratch; all my changes were visible again!

TL;DR - there was a typo in a statement (a missing closing tag) somewhere in the file. Rather then give an error, it discarded everything in the file. So whenever somebody finds him/herself in this situation; empty the file and put everything back line by line 'till you see the error!

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.