ClickCease
exception printing is disabled by default for security reasons

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 by default for security reasons

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 by default for security reasons. magento 2

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!

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

magento-shared-hosting-banner

Does Magento Shared Hosting is Good Option?

You never want complaints of slow speed from customers because it impacts the user buying behavior, resulting in a revenue loss. While discussing the hosting problem with many merchants, I found that big store owners often faced performance and downtime issues during their sales season.

Read More »
best magento 2 themes

Top 10 Best Magento 2 Themes in 2022

If you are a Magento store owner, you will always keep your eyes open for the best Magento 2 themes. A responsive Magento 2 theme that can work on all types of devices and screens is a must-have for modern-day ecommerce.

Read More »
magento configurable product

How to set up a Magento 2 configurable product?

When you are operating an online shop on Magento, you will be selling different types of products. While setting up simple products in Magento is easy, you will have to create a configurable product for anything that comes with options or choices.

Read More »

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