1

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 .

Aditya Shah
  • 7,617
  • 3
  • 39
  • 77
Flutterer
  • 728
  • 5
  • 19

2 Answers2

1

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

var/cache
var/di
var/generation
var/view_preprocessed
pub/static

Exceptions:

  • .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]

Aditya Shah
  • 7,617
  • 3
  • 39
  • 77
0

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

Pawan
  • 5,856
  • 2
  • 14
  • 36
  • 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
  • http://prntscr.com/kz1cky – Flutterer Sep 26 '18 at 16:28