Categories

Featured templates

WordPress. How to enable error reporting

Celine Jade December 4, 2014
Rating: 3.7/5. From 3 votes.
Please wait...

This tutorial will show you how to enable error reporting in WordPress.

WordPress. How to enable error reporting

If WP_DEBUG is enabled, all PHP errors, notices and warning messages will be displayed on your site. It is possible to modify the default behavior of PHP to make only fatal errors visible.

  1. WP_DEBUG

    WP_DEBUG is a PHP constant, used to trigger the “debug” mode throughout WordPress. It is assumed to be false by default and is usually set to true in the wp-config.php file:

    how to enable error reporting.4

    • To enable error reporting in WordPress, please log into your hosting panel, locate File Manager, open WordPress directory of your website:

      how to enable error reporting.1

    • Locate wp-config.php file and open it:

      how to enable error reporting.2

    • WP_DEBUG has to be set to true:

      define('WP_DEBUG', true);
      

      how to enable error reporting.3

  2. WP_DEBUG_LOG is a companion to WP_DEBUG that makes all errors to be also saved to a debug.log file inside the /wp-content/ directory. This is useful if you want to review all notices later or need to view notices generated off-screen (e.g. during an AJAX request or running wp-cron). Please mind, if there are no errors or warnings, a debug.log file will not be created. Also, check files/folders permissions (644 – for files; 755 – for folders).

    define('WP_DEBUG_LOG', true);
  3. WP_DEBUG_DISPLAY is another companion to WP_DEBUG that controls whether debug messages are shown inside the HTML of pages or not. By default it is ‘true’ which shows errors and warnings as they are generated. Setting this to false will hide all errors. This should be used in conjunction with WP_DEBUG_LOG so that errors can be reviewed later.

    define('WP_DEBUG_DISPLAY', false);

Feel free to check the detailed video tutorial below:

WordPress. How to enable error reporting

Highly Customizable Wordpress Themes
This entry was posted in WordPress Tutorials and tagged error, reporting, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket