1

I have a server with a production install of magento. When I deploy a new version, adding for example a new .less file, the new markup doesn't get loaded. I cleared the cache, rebuild the static-content. Only after switching to developer mode the changes are loaded.

This process, switching back and forth between dev and prod causes a goot 10 minutes downtime. Can someone explain this? What is the proper way to update css, or anything, for magento 2 in production?

Thank you

6
  • Which command were you using for deploying static-content ?
    – Black
    Sep 1, 2020 at 12:46
  • bin/magento setup:static-content:deploy de_DE nl_BE en_GB en_US fr_FR -f Sep 3, 2020 at 10:22
  • Try bin/magento setup:static-content:deploy && bin/magento setup:static-content:deploy de_DE nl_BE en_GB en_US fr_FR -f && php bin/magento c:f If that doesn't work, then also try to call php bin/magento setup:upgrade --keep-generated && php bin/magento setup:di:compile before it.
    – Black
    Sep 3, 2020 at 10:43
  • I am facing the same issue as you now and even my above commands do not help. I am facing the issue since I tried to change from production mode to developer mode. It is a bug.
    – Black
    Sep 3, 2020 at 14:45
  • Bug Report: github.com/magento/magento2/issues/29882
    – Black
    Sep 3, 2020 at 14:53

2 Answers 2

0

I am also interested in this topic, so I created an issue in git.

Also have a look into the documentation.

0

Try to Deploy Content with language code as a parameter

PHP bin/magento setup:static-content:deploy -f EN_Us // change language code as per your requriments
0

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.