My new theme works locally, but when once uploaded to live server, selected in the Admin, it shows some content, but it's not using my new XML files. The new default_head_blocks.xml defintely isn't being loaded.

Actually, some files are being loaded, but some aren't

  • What commands have you ran to deploy/since deployment? Try flushing all static files from the cache management section of the admin, it's a button near the bottom.
    – Ben Crook
    Apr 23, 2016 at 9:54
  • Hi I uninstalled the site and started again. It's really strange. After installation, I can see the images and stylesheets are being loaded. If I refresh the page, or go to the Admin area, the stylesheets and images disappear. If I then (again) change the folder permissions via the command line, they show again. Then, after updating the site, the styles disappear again – change permissions once again and they re-appear.
    – MikeMason
    Apr 24, 2016 at 11:56
  • I've run the installation from the command line: composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /home/hampers/public_html Navigated to the installation folder: find . -type f -exec chmod 644 {} + -o -type d -exec chmod 755 {} + I then used the installation wizard in the browser. It says everything's fine, but then the issue above occurs where images aren't appearing and stylesheets stop working (until I update the folder permissions again). I haven't even bothered to try to add my new theme yet!
    – MikeMason
    Apr 24, 2016 at 11:58
  • The M2 JS files aren't being loaded now...
    – MikeMason
    Apr 24, 2016 at 12:22
  • If the base and pub/static URLs are correct then I'm not sure :( I've had a few similar problems with static files missing/not loading. Sometimes clearing caches and deleting var/pre-processed helps, other times it doesn't. I'm having quite a few problems with caching even with all caches disabled, M2 doesn't seem very dev friendly at the moment :(
    – Ben Crook
    Apr 24, 2016 at 12:44

2 Answers 2


Make sure you have performed below operation on your live site:

php bin/magento setup:upgrade 


php bin/magento cache:clean


php bin/magento setup:static-content:deploy

after these all modules which are used in your theme will be installed.

  • Hi, thank you for your reply. Unfortunately, that didn't work. I'm still seeing a couple of my templates being shown on the page, amongst a load of unstyled HTML content.
    – MikeMason
    Apr 22, 2016 at 22:33

First remove var/viev_preprocessed and pub/static directories and then do a php bin/magento setup:static-content:deploy . Also keep in mind if your site has multiple store languages to add the locales at the end of the deploy command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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