Enabling error reporting in PrestaShop
PrestaShop's error reporting feature is turned off by default. There may be occasions when you need to enable error reporting. Learn how to setup PrestaShop error reporting here.
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:
-
Log in to your account using SSH.
Note
Alternatively, if your account includes cPanel, you can
use the cPanel File Manager instead. -
Use a text editor to open the config/defines.inc.php file in the directory where you installed PrestaShop.
-
Search for the following line in the config/defines.inc.php file:
define('_PS_MODE_DEV_', false);
- Modify the line as follows, changingfalse to true:
define('_PS_MODE_DEV_', true);
- Save the changes to the config/defines.inc.php file and exit the text editor. Error reporting is now enabled.
Important
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:
-
Log in to your account using SSH.
Note
Alternatively, if your account includes cPanel, you can
use the cPanel File Manager instead. -
Use a text editor to open the config/config.inc.php file in the directory where you installed PrestaShop.
-
Search for the following line in the config/config.inc.php file:
@ini_set('display_errors', 'off');
- Modify the line as follows, changingoff to on:
@ini_set('display_errors', 'on');
- To display all errors and run-time notices, add the following line to the config/config.inc.php file:
error_reporting("E_ALL");
- Save the changes to the config/config.inc.php file and exit the text editor. Error reporting is now enabled.
Important
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.
Updated 1 day ago