Domanda

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

È stato utile?

Soluzione

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

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top