0

In Magento 2, when I went to change my store mode from Developer to Production from cmd(putty), it will return one error message

Command return non-zero exit code :

So how can I fixed it and if possible then please tell me is there anything wrong from our side.

Thanks!

2
  • wich command you have used? Jan 18, 2018 at 4:38
  • i have use php bin/magento deploy:mode:set production
    – Chetan
    Mar 16, 2018 at 4:59

3 Answers 3

1

First check which mode display

php bin/magento deploy:mode:show

production mode

php bin/magento deploy:mode:set production

Please Refer this Link

https://github.com/magento/magento2/issues/9202

https://github.com/magento/magento2/issues/10431

1
  • I have checked but still, it's not working for me. the same error message is displayed. can you please suggest any reference video for fixed this issue.
    – Chetan
    Mar 16, 2018 at 9:04
0

use this

php bin/magento deploy:mode:set production
2
  • I have try it but error is still show. Is there any server configuration issue ?
    – Chetan
    Jan 18, 2018 at 4:50
  • please send me error description beacause after run this command include comile and static-content deploy ...possible error at setup:di:compile Jan 18, 2018 at 4:53
0

It may be a file permission issue, so first you have to set the permission of var and pub folders

sudo chmod -R 777 var pub

Then set the mode as you want.

php bin/magento deploy:mode:set production

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.