🔥 Just Launched! Werra Premium Template for HyväSee it in Action

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

By Sanjay JethvaUpdated on May 22, 2025 2 min read

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! 😎

Suggested Read:How to Throw Exception on Magento 2 Admin Save Configuration

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 :

php bin/magento deploy:mode:set developer

So, that’s it.

How to Enable Exception Printing in Magento 2

Feel free to share the solution on social media with fellow developers 😊

Thanks.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.