Read the PHP error log
tail_error_logDiagnose white screens, 500 errors, and critical errors by reading PHP error log. Groups duplicate entries, identifies responsible plugin/theme/core file, and reports debug settings and last fatal.
Instructions
Read the end of the site's PHP error log (wp-content/debug.log or php.ini error_log) without downloading it, with duplicate errors grouped and each one attributed to the plugin, theme or core file that raised it. Also reports whether WP_DEBUG / WP_DEBUG_LOG / WP_DEBUG_DISPLAY are on and the last fatal error the companion plugin recorded — which is captured even when logging is off. Start here for white screens, 500 errors and "there has been a critical error". Needs the companion plugin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Only entries whose message or stack trace contains this text (case-insensitive), e.g. a plugin slug. | |
| level | No | Minimum severity to include: "warning" returns fatals, errors and warnings; "all" also includes unrecognised lines. | all |
| lines | No | How many lines to read from the end of the log (1–2000). Stack-trace lines count toward this. | |
| since | No | Only entries at or after this time, as an ISO 8601 date/time, e.g. "2026-09-15T08:00:00Z". | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. |