0

Does anyone have any idea how to hide error codes on the website (frontend) if any get and instead show the client a general graphic, e.g. that we have a temporary problem, we are working on it,

2
  • redirect to 404 page when error occur !! Jun 13 at 17:19
  • Doesn't that already happen in production mode? You just need to set a custom error page
    – Jay Ghosh
    Jun 14 at 6:59
0

You need to do following things.

  1. Set your website into the production mode using this command.

php bin/magento deploy:mode:set production

  1. If you want your custom design, then modify the default 404 page.
0

Addition on the tips below: make sure the following line is commented:

ini_set('display_errors', 1);

to

#ini_set('display_errors', 1);

in app/bootstrap.php

Also what is said above: setting your site in production mode should disable the display of (most) errors.

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.