How to enable error reporting in PrestaShop

This article describes how to enable error reporting in PrestaShop. For security reasons, error reporting is disabled by default. However, if your site is experiencing problems, you may want to temporarily enable error reporting to help determine the cause.

Enabling error reporting

The steps to enable error reporting in PrestaShop depend on the version that you are running. Follow the appropriate procedure below for your PrestaShop version.

PrestaShop 1.5.3 and newer versions

To enable error reporting in PrestaShop 1.5.3 and newer versions, follow these steps:

  1. Log in to your account using SSH.
    Alternatively, if your account includes cPanel, you can use the cPanel File Manager instead.
  2. Use a text editor to open the config/defines.inc.php file in the directory where you installed PrestaShop.
  3. Search for the following line in the config/defines.inc.php file:
    define('_PS_MODE_DEV_', false);
  4. Modify the line as follows, changing false to true:

    define('_PS_MODE_DEV_', true);
  5. Save the changes to the config/defines.inc.php file and exit the text editor. Error reporting is now enabled.

    For security reasons, you should disable error reporting when you are done troubleshooting. To do this, simply change the true value back to false.
PrestaShop versions older than 1.5.3

To enable error reporting in PrestaShop versions older than 1.5.3, follow these steps:

  1. Log in to your account using SSH.
    Alternatively, if your account includes cPanel, you can use the cPanel File Manager instead.
  2. Use a text editor to open the config/config.inc.php file in the directory where you installed PrestaShop.
  3. Search for the following line in the config/config.inc.php file:
    @ini_set('display_errors', 'off');
  4. Modify the line as follows, changing off to on:

    @ini_set('display_errors', 'on');
  5. To display all errors and run-time notices, add the following line to the config/config.inc.php file:

    error_reporting("E_ALL");
  6. Save the changes to the config/config.inc.php file and exit the text editor. Error reporting is now enabled.

    For security reasons, you should disable error reporting when you are done troubleshooting. To do this, simply change the on value back to off.

More Information

To view the official online PrestaShop documentation, please visit http://doc.prestashop.com.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.