Exception printing is disabled by default for security reasons is a popular error in Magento 2 when installing new extensions and setting configuration or even server memory is overloaded. Let’s begin this article by understanding these errors, their cause, and of course the solution
What is “Exception printing is disabled by default for security reasons ”?
Let’s begin with “What is Exception printing is disabled by default for security reasons” in detail. First of all, let me tell you one thing that this is not a very important thing. This is one of the simple errors you get when there is any type of update in your Magento 2 and you are able to easily solve this error in some step. In most cases, the error appears when there is any installation of a theme or module in your Magento 2 store. Besides, it also appears when there is some error in your cache folder. And due to this type of error and problems, the Magento 2 website stops working. Therefore, to solve this problem go through these simple methods where you will get a detailed explanation about Exception Printing is Disabled by Default for Security Reasons in Magento 2.
Generally, there is always a common message display for error. That is ‘There has been an error processing your request‘. This error is not the ERROR itself. But along with this message, you will be informed of the error in Magento. Like this screenshot:
This message is a notification of an error, that isn’t displayed, to prevent system exploit.

Here are the main reasons for this error:
- While updating from Magento 1 to Magento 2
- While you update the Magento Extensions
- At the time, when you install the Magento theme/module
- Or when you create an error due to cache folder
- Conflicts between extensions or themes
- Session issue is also a reason
Due to this, the Magento 2 cannot operate properly, living us developers in a mess! In the next part, we will provide you the solution to this
How to solve this?
Firstly, if you’re not involved with managing your server and your Magento backend, it might be essential to check with your developers to see if they’re doing on the Magento backend. It is likely that your developers might be troubleshooting things on your website backend which leads to this message.
In short, there are two methods to solve this error message: (1) clear your cache and (2) enable printing errors. Now we’ll go into details on each solution.
Method 1: Clear your cache
Step 1: Firstly when you occur this error you have to go to folder pub/errors and find the file named local.xml.sample.
Besides, you could also go to your Magento admin and move to System > Cache Management > Flush Cache Storage.
Step 2: Now, you have to refresh your Magento site to see if the error message is gone.
Method 2: Enable exception printing errors
If the above way doesn’t work, then you are to enable printing errors to find out what the exact issues are and deal with them.
Step 1: To enable printing errors, you’ll need to switch your website to developer mode by using this command
php bin/magento deploy:mode:set developer
Step 2: You move to the /pub/errors folder in your Magento 2 directory and adjust the name of this file:
local.xml.sample
to local.xml
.
Step 3: you have to refresh your error page and you should be able to see a list of errors like so:
[2020-12-12 22:35:20] main.CRITICAL: Class Magento\Framework\App\Http\Interceptor does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\\Framework\\App\\Http\\Interceptor does not exist at /home/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:24)"} []
Step 4: Now you see the specific errors you need to debug! This solution works for all Magento versions (2.1.x, 2.2.x, 2.3.x, 2.4.x).
Conclusion
That’s all about Exception printing is disabled by default for security reasons. We hope that you found this tutorial helpful. However, If you are still getting the error or have any questions, then contact our support team to get an instant solution. We’re very pleased to support you.
Besides, if you are looking out for a cost effective Magento package for your eCommerce store, then look nowhere other than Magesolution. We not only offer an affordable Magento Development Package for all size and budget but also ensure that it helps your online business grow and sustain. Contact us for a free consultation!