I upgraded a website from 2.0.5 to 2.1.5. The website uses a custom theme.

In this theme, I added some css to include in the layout


But none of the CCC are being included in the head tag in frontend. The upgraded website uses the correct theme, because it loads the content of phtml for example.

1 Answer 1


Make sure the syntax are correct

<?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">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
        <css src="css/custom.css" />

Also, make sure that CSS is on your following path


And run the following commands

php bin/magento setup:upgrade
php -d memory_limit=1G bin/magento setup:static-content:deploy
php bin/magento cache:flush

If still not working, Clear your browser cache or try different browsers.

  • It is solved. I don't know exactly what is the point that I have missed, but I did not re-run the upgrade command when it was not working, but only deployment and flush cache. So I re-ran one by one the command lines you mentionned. I made a change in theme table too: all my theme type was set to virtual (1 value) and I changed it to physical (0 value). And I used a theme that have a parent, so I put in the child theme some parents files.
    – Mirindra
    Dec 6, 2017 at 8:32
  • @Mirindra : Glad you resolved it Dec 6, 2017 at 10:18

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.