Bugs happen. When they do, error reporting is needed to squash them. Here is how to turn it on.
Look for these line and/or add them to your WordPress wp-config.php file. This file is located in your WordPress home directory.
// Turn on Debugging define('WP_DEBUG', TRUE); // Yes, log errors please define( 'WP_DEBUG_LOG', TRUE ); // Let's not show errors on the page. define( 'WP_DEBUG_DISPLAY', FALSE );
Now, when things go bad for WordPress, you can see why by visiting this file:
Now go a step further and turn on PHP Error Reporting. Add this snippet next.
// Turn on Error Reporting ini_set("log_errors", TRUE); // Report ALL issues, not just the really bad ones. error_reporting (E_ALL); // Let's not show errors on the page. ini_set ('display_errors', FALSE);
This creates error logs in the folder that they’ve happened in. For WordPress theme and plugin issues, we generally are interested in this file:
It’s important to point out that once the bugs are squashed, you probably should turn error reporting off. To do this, simply change each TRUE to FALSE.