How to enable debug mode on PrestaShop: an easy step to solve problems on your site
Activating the debug mode on PrestaShop can be very useful in several situations. For example, if you encounter errors or bugs on your site, the debug mode allows you to collect detailed information that will help you understand what is going on and find a solution. In addition, enabling debug mode allows you to display debug messages on your site's pages, which can be useful for checking that different parts of your site are working properly. In general, enabling debug mode gives you more control over your site and makes it easier to solve problems.
The debug mode can also be useful to combat 500 errors or white pages when using PrestaShop. These errors can be difficult to diagnose and resolve, but enabling debug mode allows you to collect detailed information about what is happening, which can help you understand the cause of these errors and find a solution. In addition, debug mode allows you to display debug messages on your site's pages, which can help you quickly identify the parts of your site that are causing these errors. In general, enabling debug mode is a valuable tool to combat 500 errors or white pages when using PrestaShop.
PrestaShop 1.4 and before
- Use your usual FTP client to your hosting server /config/config.inc.php file
- In this file, go to it the optiondisplay_errors
replaces @ini_set ('display_errors', 'off');
by @ini_set('display_errors', 'on'). - Save your file on your server
- Refresh the page in your site in order to highlight the error message
- If you don't understand the error message, then head over to the official PrestaShop forum to ask for help.
PrestaShop 1.5, PrestaShop 1.6
- Use your usual FTP client to your hosting server /config/defines.inc.php file
- In this file, go to it the optiondisplay_errors
replaces define('_PS_MODE_DEV_', false);
by define('_PS_MODE_DEV_', true); - Save your file on your server
- Refresh the page in your site in order to highlight the error message
- If you don't understand the error message, then head over to the official PrestaShop forum to ask for help.
PrestaShop 1.7, PrestaShop 8
from the backoffice:
- Log on to your backoffice
- Go to the page Advanced Parameters > Performance
- Activate the Debug mode in the Debug section
- Save this configuration
- Remember to disable Debug mode after making your changes
If you don't have access to the backoffice :
- Use your usual FTP client to open your /config/defines.inc.php file on your web hosting server.
- In this file, set the display_errors option to ON.
replaces define('_PS_MODE_DEV_', false);
with define('_PS_MODE_DEV_', true); - Save your file on your server
- Refresh the page of your site to highlight the error message.
- If you don't understand the error message, then go to the official PrestaShop forum to ask for help.
PrestaShop Cloud
- Use your usual FTP client to your hosting server /.htacess file
- put the HTTP_PS_MODE_DEV_ constant to true
- Save your file on your server
- Refresh the page in your site in order to highlight the error message
- If you don't understand the error message, then head over to the official PrestaShop forum to ask for help.