
The short answer: when the site shows a white page or a “critical error” without saying why, debug mode makes WordPress write the error to a file. You switch it on with three lines in wp-config.php. But there is a rule: switch it off when you finish, and do not leave errors in view of visitors.
The three lines
| Line | What it does |
| define( 'WP_DEBUG', true ); | Switches on debug mode: WordPress starts recording warnings and errors. |
| define( 'WP_DEBUG_LOG', true ); | Writes them to the file wp-content/debug.log. |
| define( 'WP_DEBUG_DISPLAY', false ); | Does not show them on screen, so visitors do not see them. |
Step by step
|
|
|
|
|
| The debug.log file is public by default: whoever knows the address (your-domain.com/wp-content/debug.log) can read it, and it shows paths and plugin names. So: switch the mode off when you finish, delete the file and, if you must leave it on, protect it. Never leave WP_DEBUG_DISPLAY true on a site with visitors. |
| If the site will not even open because of the error, deactivate the plugins first: Disabling plugins, even when you cannot get in. |
|
The log does not help and you still do not understand? Open a ticket with the last lines of debug.log (no passwords). Open a support ticket |
|
SEE ALSO Common WordPress errors: white screen, critical error and how to find the cause Where the PHP error log is, how to read it, and the errors you will see most |
RECOMMENDED PRODUCT WordPress hosting One-click install, updates handled, and speed that holds up. from 321,75 MT/mo (3-year plan, with coupon) See plans |
- 0 Users Found This Useful











