Solved: Exception Printing is Disabled by Default for Security Reasons in Magento 2

Solved: Exception Printing is Disabled by Default for Security Reasons in Magento 2

Ever faced an error of “Exception Printing is Disabled for Security Reasons” in your Magento 2 store?

If yes, keep reading, because the post explains the error, its cause and of course the solution ­čśâ

What does Exception Printing is Disabled by Default for Security Reasons in Magento 2 means?

How to Enable Exception Printing in Magento 2

This message is a notification of an error, that isn’t displayed, to avoid system exploit.

It is a general error, usually occurring at the time of Magento 2 or extension update. You may face this error while installing a Magento 2 theme or module or anything goes wrong with cache folder.

The conflict between components like extensions or themes causes the “exception printing is disabled by default for security reasons” error in Magento 2.

Due to which, the Magento 2 cannot operate properly, living us developers in a mess!

But, we developers tend to find out the solution every time, isn’t it!┬á­čśÄ

Solution for Exception Printing is Disabled by Default for Security Reasons in Magento 2:

Go to folder pub/errors find file local.xml.sample

Rename the file local.xml.sample to local.xml in the same folder pub/errors

Also, set developer mode using the following command :

So, that’s it.

How to Enable Exception Printing in Magento 2

If you still have any doubts, do not hesitate to mention them in the Comments section below. I’d be happy to help.

Feel free to share the solution on social media with fellow developers ­čśŐ

Thanks.

 

5
(based on 17 Reviews)

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

10 comments On Solved: Exception Printing is Disabled by Default for Security Reasons in Magento 2

  • Hello Sanjay, after running this command issue has been solved but my site is opening very slow

  • Dear Sanjay,
    Very usefull tip, thank you ! It worked for me.
    Question: Once Magento is fully recovered, shall we revert the commands.
    Meaning to say, rename the file into local.xml.sample and undo developer mode ?
    What is your advise ?
    Best regards

    • Hey!
      Thanks for the appreciation and I’m glad the solution was helpful to you.
      Now, as far as your question is concerned, yes you need to revert from the developer mode to the production mode.
      Thanks.

  • What is the command to turn off developer mode

    • Hello Richard,
      Take the site in the production mode using the below command:
      bin/magento deploy:mode:set production
      Thank you.

  • very helpful,
    Thanks!

  • Hi Sanjay,
    How can I do this below? with which programm?

    (Also, set developer mode using the following command :

    php bin/magento deploy:mode:set developer
    1
    php bin/magento deploy:mode:set developer)

    Kind regards
    Dani

    • Hello Dani,
      Check the following:
      1. using SSH you can run this command
      2. also in c-panel if the terminal is available

      Thank you.

  • Hello Sanjay,

    Unfortunately I’m lacking the skill sets to carry out the “Solution for Exception Printing”. Can you provide other options?

Leave a reply:

Your email address will not be published.