I'm trying to duplicate a Magento theme from one Magento install to a fresh install on another server however the theme appears to load the default luma theme.

I have removed /pub/static/frontend/ and have ran the following command however it still isn't working.

php bin/magento setup:static-content:deploy -f

Is there anything I need to bear in mind when duplicating the theme. I can confirm that both installs are using the same version of Magento and are using the exact same theme files so its confusing me as to why they look different.

It appears that the default.xml and default_head_block.xml isn't having any affect on the theme.

Any help would be appreciated :)

1 Answer 1


There are a couple of things that come into my mind as suggestions.

First, when I have to switch between themes, I run the static-content compilation specifying also the language and the themes, recompling also the backend theme event if not needed, like this:

php bin/magento setup:static-content:deploy -l it_IT -l en_GB -l en_US --theme Magento/backend --theme Myvendor/myFrontendtheme

before running the compilation I empty all the pub/static/* folder and all the var folders that have some "memory" about the used theme,

rm -rf var/cache/* var/view_preprocessed/* var/generation/* var/page_cache/* var/session/* pub/static/*

and also clean the cache with cache:flush and cache:clean to be even more sure, before and after the static content compilation.

You would also like to check the value of compilation mode, if it is on server-side or client-side compilation.

Nothing special but hope it helps.

  • Thank you for your suggestions :) Unfortunately it hasn't resolved my issue although I have learnt more in regards to the compilation, I wasn't aware you could pass through the theme so thanks for letting me know.
    – lky
    Feb 12, 2018 at 15:42
  • sorry that your problem is not yet solved. another question: is the theme correctly installed in your new magento installation?
    – sissy
    Feb 12, 2018 at 16:05
  • I believe so, it seems to be running the correct theme it's just displaying incorrectly. It's not running any of my updates within my default_head_blocks.xml and not loading in the correct stylesheets but just unsure why its not working.
    – lky
    Feb 12, 2018 at 16:18
  • ok, so you can see it in Design->Themes and set it from the backend in Design->Configuration?
    – sissy
    Feb 12, 2018 at 16:36

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.