I`m trying to make a new theme and all steps are done:

  • Create theme directory app/design/frontend/MySite/MyTheme
  • Create theme.xml file under app/design/frontend/MySite/MyTheme
  • Add registration.php

And I found my theme in my admin panel , Now I overriding _theme.less file. but how the less will be compile? I'm using localhost (xammp)

I had to delete files inside these directories manually after finishing my edit but no result: pub/static/frontend/YourVendorName/YourTheme/, var/cache/ and var/view_preprocessed


1 Answer 1


As you haven't mentioned client-side I presume you are currently compiling LESS with server-side compilation enabled?

To compile on server-side mode I recommend clearing pub/static and var/view_preprocessed then navigating to the Magento root directory and running php bin/magento setup:static-content:deploy

If you don't wish to do this all the time I recommend changing to client-side compilation. To do this login to the admin and go to stores > config > advanced > developer > Front-end development workflow and changing it to client-side. This will then compile the less on each page refresh, although there are times I still need to clear pub/static.

If that doesn't work I would double check your code/file structure and as a last resort disable varnish and your caches.

  • all this stuff is already done , i trying one with the server-side compilation and other time client-side compilation ... in all cases and on my experience the client side is boring and really slow , the server side is also boring because you need to deploy every time you add a single line in the less .. Magento going to make me a crazy :( Apr 26, 2016 at 11:58
  • If client-side is working correctly then client-side should load within a second or two. A third option, you can use grunt - devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/…
    – Ben Crook
    Apr 26, 2016 at 12:14
  • how i deploy my theme only ?? the "php bin/magento setup:static-content:deploy" deploy all themes and its take so long time ? Apr 26, 2016 at 19:16
  • i found in my deploy that i have 10 errors :( how to know them ? Apr 26, 2016 at 19:19
  • 1
    There's currently no way to only deploy 1 theme :( I have asked about the errors but no one has answered - magento.stackexchange.com/questions/112442/…
    – Ben Crook
    Apr 27, 2016 at 6:59

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