What are the best practices to update the website in production mode?

For example, if I need to update the less files, images, js etc. what would be the best approach to update the website in production mode?

  • How to compile less files in the production mode? – Kamlesh Yaduwanshi Jan 21 at 10:46

In case of css changes should happen inside your theme app/design/frontend/Vendor/Theme/web/css/source/_filename.less or app/code/Vendor/Module/view/frontend/web/css/source/file.less

The same applies for images and js on the respective paths.

Once you modify or create these files, you can then deploy to production only the static files with the command php bin/magento setup:static-content:deploy Language_TAG -f (ex language. en_US).

This is the correct way of how you do it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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