How can I hide errors from the main site?

My developer mode is off.

PHP bin/magento maintenance:disable.
What can I do? My site is not working.

By mistake, I run the command.

php bin/magento deploy:mode:set developer

Now it is showing an error, and the overall site is not working.

  • 1
    add screenshot of error or add error in question Commented Mar 18, 2021 at 10:21
  • Can you add more details about the error you get?
    – djm.im
    Commented Mar 18, 2021 at 10:25

3 Answers 3


Run the following commands :

php bin/magento deploy:mode:set production

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex

If you want to hide an error on the screen then go to app bootstarp.php and change it to ini_set('display_errors', 0);

And also add error in your quetion.


Run php bin/magento deploy:mode:set production or php bin/magento deploy:mode:set default

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.