To enable debug mode in WordPress:
-
Find the line with the parameter
WP_DEBUG
:
define('WP_DEBUG', false);
In the found line, replace
false
on
true
so that it looks like this:
define('WP_DEBUG', true);
If errors need to be displayed not on the screen, but in the standard WordPress log file (by default, this
wp-content/debug.log
), under the line with the parameter
WP_DEBUG
insert lines like this:
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
Save your changes.
Reproduce the error on the site to see it offscreen or log it to the WordPress log file.
After identifying the source of errors on the site and eliminating their causes, it is recommended to disable debug mode.