Facing a site showing a blank page or a 500 error, the most useful reflex is not to test random fixes, but to open the right error log. Several logs coexist on a WordPress site or a custom PHP build, and each captures a different category of problem. Knowing which one to check first avoids wasting time looking for information that is simply not in the wrong file.
Two logs, two different levels
WordPress's debug log, located by default at wp-content/debug.log, records errors occurring once WordPress has properly started: a deprecated function call in a plugin, an error in a theme, a warning tied to a database query. The PHP error log, managed at server level and accessible through the hosting control panel, captures a broader scope, including errors happening before WordPress even fully loaded, such as a fatal syntax error or a memory exhaustion.
The trap of an empty WordPress log
An empty debug.log does not mean no error occurred. It may simply mean the incident happened before WordPress reached the point in its execution where it starts writing to that file. In that specific case, the information sought is almost always found in the server's PHP error log, which remains accessible even when WordPress fails to start at all.
Enabling the debug log safely
Enabling this log on WordPress requires adding three constants to the wp-config.php file, above the line marking the end of the configuration: WP_DEBUG set to true to turn on error reporting, WP_DEBUG_LOG set to true to write errors to a file instead of losing them, and WP_DEBUG_DISPLAY set to false to prevent them from showing publicly on the site, an essential security precaution since these messages can reveal file paths or technical details exploitable by a malicious visitor. This configuration should remain temporary: leaving it permanently active on a live site slows it down and needlessly exposes sensitive information if public display is not properly disabled.
Recognizing the type of error encountered
Logged messages follow a severity hierarchy. A PHP fatal error completely halts script execution and typically causes the dreaded blank page. A warning signals a problem that does not prevent the page from displaying but deserves fixing. A deprecation notice indicates a used function will be removed in a future version of the language or software, information especially useful before migrating to a newer PHP version.
File size, a problem in itself
On an active site with several plugins generating repetitive messages, the debug.log file can reach a significant size within just a few weeks, which slows down opening it and complicates searching for a specific piece of information. Regular rotation, archiving then periodically clearing this file, keeps it usable. On hosting without direct access to this automatic rotation, a simple scheduled task can handle it.
Securing access to these files
A debug.log file left publicly accessible, for instance at the site's direct address followed by wp-content/debug.log, exposes technical information that makes a targeted attack easier. Checking that this file is not directly reachable from a browser, and placing it outside the site's public directory when possible, remains a simple but regularly overlooked security measure.
Combining both sources for faster diagnosis
Faced with a persistent problem, checking both logs in parallel, rather than one after the other, usually gives a complete picture of the incident within minutes: the server log reveals whether the problem sits at the infrastructure level itself, while the WordPress log specifies which plugin, theme, or portion of code is causing the malfunction once the site has loaded.
Sources and guidance
For your project : NIKAIA.NET services.