0

Whenever i run command bin/magento deploy:mode:set production, it always auto deploy all languages, takes a long time, makes high CPU and RAM usages.

I would like it to generate files for en_US instead
How do i achieve this?

I used bin/magento setup:static-content:deploy -f en_US, it is fine but Magento App does not switch to production mode

0

2 Answers 2

0

Make sure you have set your locale in Stores > Settings > Configuration > General. https://docs.magento.com/user-guide/stores/locale-options.html

Magento should only deploy the locale you have set for your store, and also the locale for your admin users, if different. You can set Admin user locale by clicking username in top right corner.
https://docs.magento.com/user-guide/stores/admin-account.html

1
  • Thank @bernieu2. I just realized that my shop has too many website and languages. Every time i run deploy without parameter or run deploy:mode:set production, the system auto deploy all lang
    – Nhat Lich
    Commented Apr 16, 2021 at 3:10
0

You can use below command:

bin/Magento deploy:mode:set production -s

where: -s (--skip-compilation) is an optional parameter you can use to skip code compilation when you change to production mode. For more see here

1
  • thank you @Arunendra
    – Nhat Lich
    Commented Apr 16, 2021 at 3:11

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.