how can i hide errors from main site ?

my developer mode is off

php bin/magento maintinance: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 error and overall site is not working .

  • rm -rf <magento.host>/var/di/* <magento.host>/var/generation/* – Aditya Shah Sep 26 '18 at 16:29

When you change to developer or production mode, we clear the contents of following directories:



  • .htaccess files are not removed
  • pub/static contains a file that specifies the version of static content; this file is not removed

  1. delete the contents of the var/generation and var/di directories:

    rm -rf <magento.host>/var/di/* <magento.host>/var/generation/*

  2. Set the mode:

    bin/magento deploy:mode:set {mode} [-s|--skip-compilation]


There are 3 mode available in Magento

  • Default
  • Developer
  • Production

As you can not switch from Developer to Default. You need to set Production mode By

php bin/magento deploy:mode:set production

  • there is some issue when i run this command . some errors appear . i can not solve that ... so in short i just want to romove error logs from screen and make site running again – Flutterer Sep 26 '18 at 16:20
  • But in developer mode It will log error on front.You need to remove error and enable production mode. – Pawan Sep 26 '18 at 16:23
  • i was not in developer mode before ... and there were no errors on screen obviously . by mistake i have started developer mode .. i just want to go back to production mode i dont know how to remove the error ... – Flutterer Sep 26 '18 at 16:25
  • what error you are getting when changing mode ? – Pawan Sep 26 '18 at 16:26
  • prntscr.com/kz1cky – Flutterer Sep 26 '18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.