Question

In My Store I am using two languages en_US and ar_SA.

But, unknowingly I ran this command

php bin/magento setup:static-content:deploy es_MX.

Something like this, other language which I was not using in my store at all.

Please help me understand what will be the consequences of this and how can I revert this.

Was it helpful?

Solution

Magento has below command to deploy the static content for your store which includes the files like css file js file you fonts your traslation.json file images(other than the product & catalog images) & the html templates file that are needed in the view structures & used with the KOjsat your checkout page. It also produces the separate css & js files written specifically for the modules

php bin/magento setup:static-content:deploy

Now at the time of deployment when you want that a specific theme should be get deployed then we can use below command

php bin/magento setup:static-content:deploy --theme {Vendor}/{theme_name}

& if you are having store with Multiple languages & you wanted to deploy specific store's content in specific language you can use the below command

php bin/magento setup:static-content:deploy en_US

It will simply deploys the static content for your store in specific language you have used at below location you can find it.

magento_root\pub\static\frontend{vendor}{theme_name}\en_US{the language code for your store you have used at time of deployment}

Now if you don't want your store in this language or you want to remove these deployed content you can simply run the below commands to revert your store

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy [your_language_code like en_US]

php bin/magento cache:flush

Here your store is again available in your chosen language just refresh the front-end page

Note:Always run these commands from Magento_root directory (Directory inwhich your Magento is installed)

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top