Every WordPress diagnosis ends at the same place: a log line. The problem is that logs look hostile — timestamps, paths, jargon — so most people skip them and guess instead. But a log line has exactly three useful fields and a small vocabulary. Learn both and every error becomes a next action. This guide uses real lines from our client audits.
Turning the log on
In wp-config.php, above the “stop editing” comment:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the failing page once — errors are written to wp-content/debug.log. DISPLAY stays false on live sites: showing errors publicly leaks paths and versions. Hosting-level logs (cPanel errors, nginx error log) record the same events and are readable even when wp-config is unreachable.
The anatomy of a line
[20-Oct-2026 08:14:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wcf_checkout() in /home/site/wp-content/plugins/checkout-kit/includes/render.php on line 88
- Severity:
Fatal error— execution stopped here. - Message:
Call to undefined function wcf_checkout()— the actual problem. - Location: the path names the plugin (
checkout-kit), the file, and the line.
Three fields. The location usually hands you the guilty plugin directly; the message tells you what went wrong with it.
The five severities, ranked by urgency
| Severity | Meaning | Next action |
|---|---|---|
| Parse error | PHP cannot even read the file (syntax typo, truncated upload) | The named file is broken — restore from backup or reinstall the plugin |
| Fatal error | Execution stopped (undefined function/class, memory, timeout) | Decode the message below; usually update or deactivate the named plugin |
| Warning | Something is wrong but execution continued | Note it; hunt warnings if the site misbehaves without failing |
| Notice | Minor code-quality issue (undefined index, etc.) | Ignore unless debugging a specific behavior |
| Deprecated | Uses an API scheduled for removal | Plan an update — these predict future fatal errors after PHP upgrades |
The fatal-error messages that cover 90% of cases
Call to undefined function X()— the code called a function that does not exist: a companion plugin is missing or outdated, or a partial update happened. Fix: update both plugins; deactivate if the update fails. (The full playbook: critical error guide.)Class "X" not found— same story, object edition: usually an autoload/version mismatch between two plugins bundling the same library.Cannot redeclare function X()— two plugins bundle the same helper. Find both from the path in a second log line; remove or update one.Allowed memory size ... exhausted— the memory ceiling; the named file is the victim, the eater needs the memory diagnostic.Maximum execution time exceeded— a request ran too long: slow external API or runaway query. Note what the page was doing when it died.Failed opening required ...— files missing mid-plugin: corrupted install. Delete the plugin folder and reinstall clean.
Reading habits that make logs useful
- Read bottom-up: the last lines are the most recent events.
- Correlate timestamps with when the symptom occurred — logs accumulate weeks of noise.
- Trace the repeat offender: ten warnings from the same plugin file is a diagnosis, even without a fatal.
- Timestamps are UTC — align with your timezone before correlating with analytics or order logs.
After the fix
Clear the page cache (cached error pages survive their own cure, as the WSOD guide warns), then watch the log for a day: the same error returning means the fix addressed the symptom, not the cause. The free audit reviews recurring log errors as part of its stability check.
With WP_DEBUG_LOG enabled, errors write to wp-content/debug.log. Hosting panels also keep PHP error logs (cPanel errors, site error logs) that capture the same events. A fatal error stops page execution — visitors see broken output. A warning lets the page continue but signals a defect worth fixing before it becomes fatal. A plugin or theme called code that does not exist, usually because a companion plugin is missing or outdated. Update both; if the update fails, deactivate the one named in the path. Yes, with WP_DEBUG_DISPLAY set to false — errors go to the log file only, nothing shows to visitors. Displaying errors publicly would leak server paths and versions. The code uses a PHP or WordPress API scheduled for removal. It still works today but will break after the next PHP/core upgrade — schedule the affected plugin's update.Where is the WordPress error log located?
What is the difference between a fatal error and a warning?
The log says 'undefined function' — what now?
Is it safe to enable WP_DEBUG on a live site?
What does 'Deprecated' mean in the log?