Problem Setting Production Mode – Deploying Static Content – error shows if different locale

While setting Production Mode, Following error shows.

Command returned non-zero exit code:

Command returned non-zero exit code:
`/usr/bin/php7.0 -f /var/www/mage2/public_html/bin/magento setup:static-content:deploy -f en_GB en_US`

Change the mode and skip the compilation:

php magento deploy:mode:set production --skip-compilation

And once the mode is switched you can deploy static content with GB locale.

php magento setup:static-content:deploy en_GB

Magento default locale is en_US so you have to define your language.

If that fails, make sure your /var and pub/ have the correct permissions

It could be that your PHP is exhausted so increasing the limit in php.ini should help but skipping the compilation and compiling after switch is a good workaround.

Also, make sure your store in use has a valid theme selected, it might be that you are using a theme that doesn’t exist in the system.

 

Was this article helpful?

Related Articles

Leave A Comment?