Exception printing is disabled - Devrims

How to Resolve “Exception Printing is Disabled by Default for Security Reasons” in Magento 2?

Imran Khan

How to Resolve “Exception Printing is Disabled by Default for Security Reasons” in Magento 2?

Exception printing is disabled - Devrims

Table of Contents

Magento 2 users encounter “Exception printing is disabled by default for security reasons” when attempting to update either Magento 2 or a theme or module on their store.

exception printing is disabled errore - Devrims

Fortunately, you can fix this error by following a simple process that we’ll describe below. 

What does “Exception Printing is Disabled by Default for Security Reasons” Mean?

Magento users often see this notification when they try to install a new theme or a module on their store. Some users even see it when updating Magento to the latest version. 

This notification indicates that there is a conflict within your Magento installation. While this notification doesn’t point towards a critical error, you should go through the resolution process to avoid escalating the issue into something that could potentially break your store.

What Causes "Magento exception printing is disabled by default for security reasons"?

The notification often arises when updating or installing a module or theme. During the process, Magento encounters an internal conflict between the components and raises the notification you see at the frontend. 

Another cause of this notification is the cache-related issues that could pop up when updating store components.

Fortunately, both these underlying issues can be easily fixed by following the steps in the next section.

Fixing "exception printing is disabled by default for security reasons"

Important: Before attempting the steps, it is always good to check with your developers. If you have developers managing your server, it’d be best to ask them to fix this issue. 

Clear the Cache

This fix applies to both Magento 1 and Magento 2.

To flush the cache, go to Magento Admin > System > Cache Management > Flush Cache Storage.

Alternatively, you can remove the cache folders via SSH or SFTP.

rm -rf *
  • Delete everything in the folder
exception printing is disabled - Devrims

Refresh the site and confirm whether the notification is no longer visible at the frontend. 

  • Connect your server via SFTP
  • Go to /var/cache in the webroot of your application.
  • Ctrl+A to select all folder
  • Hit Delete to delete everything in the folder
Enable Exception Printing in Magento 2

If the above fix doesn’t work, you need to dig deeper and find out the exact error causing the notification. This requires Magento to enable exception printing. 

Step 1: Switch to Developer Mode

  • Go to the Magento command line and type the following command:

bin/magento deploy:mode:set developer

Step 2: Rename local.xml.sample

  • Go to the /pub/errors folder
  • Find the file xml.sample.
  • Rename this file to xml.

Step 3: Refresh the Error Page

Refresh the page, and you’ll see the description of the error(s). This allows you to drill down to the issue and fix the actual error flagging the notification.

Enable Exception printing in Magento 1

The process is similar to Magento 2. You need to enable the developer mode and rename local.xml.sample to local.xml

You’ll see the error you need to fix to resolve the notification.

Conclusion

“Exception printing is disabled by default for security reasons” might be a scary error to many Magento users. However, it is an indication that there is something wrong with the Magento installation. You can quickly fix the issue by going through the fixes proposed in this article. 

Let us know if you need help resolving the specific Magento error(s) that you might discover during the process. 

Share it!

Share on facebook
Share on linkedin
Share on twitter

Share it!

Share on facebook
Share on linkedin
Share on twitter

Start Creating Web Apps on Managed Devrims Cloud Server Now

Easy Web Deployment for Agencies, Developers and e-commerce Industry.

There's More To Read

For 3 Months Avail Free
Magento Migration

Code: DEV30MAG

* T&C Apply

For 3 Months Avail Free
Magento Migration

Code: DEV30MAG

No Thanks

* T&C Apply