I have two Magento 2 sites, both which have an identical module.

On site 1, if I update the .phtml template file of the module, I have to go to developer mode and back to production mode to see the update. On site 2, I just have to click Flush Cache Storage and can stay in production mode, and the update appears.

It is my understanding that site 1's behaviour is the expected behaviour, but I really can't find what the actual difference is between the two sites for them to act differently here.

I've tried the following:

  • Turning off all modules except the core Magento ones and the one I am editing the .phtml file on
  • Applying the same template to both sites
  • Making sure the cache settings in etc/env.php match on both sites

My hunch is that site 2 is not using the "var/view_preprocessed" cache for some reason, as if I edit the .phtml file manually there, then site 1 shows the update when I click Flush Cache Storage, but site 2 does not.

However, I now have no idea where else to look to find out why they are behaving differently. Any ideas?

  • 1
    I think you enabled allow symlinks in site 2.
    – HoangHieu
    Commented Mar 12, 2022 at 0:26
  • Symlinks were set as off on both, but I noticed in the admin settings that minify HTML was on with site 1... and changing that meant they work the same. Thanks for pointing me in the right direction!
    – RichardB
    Commented Mar 12, 2022 at 8:07

1 Answer 1


The difference between the sites was the minify HTML setting being on with site 1 and off with site 2. Toggling this makes the sites behave the same.

My understanding was that you are supposed to not be able to update these files in production (thus thinking site 1 was working correctly), but that might be me misunderstanding this page.

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.