wp-debug
Skill1 starsChanged 4 months agoMITView on GitHub
Diagnose a WordPress white screen, 500 error, or fatal error. Use this when the user says the site is blank, returns HTTP 500, shows "There has been a critical error on this website", or is broken after a plugin, theme, or core update. Walks through WP_DEBUG setup, debug.log interpretation, and the most common root causes.
In this repository5 other files it gives its agents.
- db-migrationSkill
- gutenberg-blockSkill
- plugin-scaffoldSkill
- security-auditSkill
- theme-initSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use the description to prioritize which branch of the workflow to start from.
- Very specific: line 22
If wp-config.php is available, read it and look for existing WP_DEBUG constants.
- Very specific: line 39
Use Read to open wp-content/debug.log.
- Very specific: line 65
After the suggested change, ask the user to reload the page.
- Distinctive: line 67
If the site is still broken, re-read the log.
- Very specific: line 92
Do not ask the user to set WP_DEBUG_DISPLAY = true on a production site.
- Very specific: line 93
Do not delete debug.log. Read it.
- Very specific: line 94
Do not run wp db repair or modify the database as a first step.
- Distinctive: line 95
Do not edit plugin or theme code to swallow the error.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diagnose a WordPress white screen or fatal error
Guide the user from "site is broken" to a specific root cause in under ten minutes. Most failures fit one of five patterns: plugin conflict, theme fatal, PHP memory limit, PHP version mismatch, or a missing or corrupt core file.
Inputs
$ARGUMENTS is an optional one-line description of the symptom. Examples: site is blank after updating WooCommerce, 500 error only on /wp-admin, critical error email from WordPress.
Use the description to prioritize which branch of the workflow to start from.
Workflow
Step 1. Enable WP_DEBUG safely
If wp-config.php is available, read it and look for existing WP_DEBUG constants. Ask the user to add or update these three lines above the /* That's all, stop editing! */ line:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );Explanations:
WP_DEBUG_LOG = truewrites errors towp-content/debug.loginstead of the screen.WP_DEBUG_DISPLAY = falseanddisplay_errors = 0keep errors out of the HTML response, which matters on a production site.
Reload the broken page once to trigger the error, then read the log.
Step 2. Read debug.log
Use Read to open wp-content/debug.log. Use Grep with the pattern PHP Fatal error|PHP Parse error|Uncaught|Allowed memory size on the log to get the relevant lines fast. The newest errors are at the bottom.
Each fatal line follows this shape:
[17-Apr-2026 12:04:11 UTC] PHP Fatal error: Uncaught Error: Class "Acme\Foo" not found in /var/www/html/wp-content/plugins/acme-forms/includes/bootstrap.php:42Extract:
- The error class (Fatal, Parse, Uncaught TypeError, Allowed memory size).
- The file path. The path tells you whether the fault is in a plugin, a theme,
wp-includes, or custom code. - The line number.
Step 3. Map the error to one of the five root causes
| Signal in debug.log | Root cause | Fix |
Allowed memory size of N bytes exhausted | PHP memory limit | Raise WP_MEMORY_LIMIT in wp-config.php to 256M and, if still failing, php_value memory_limit in .htaccess or php.ini. |
Error path contains wp-content/plugins/<slug>/ | Plugin fatal or plugin conflict | Rename the plugin folder over SFTP or run wp plugin deactivate <slug> to confirm. If the site recovers, the plugin is the cause. |
Error path contains wp-content/themes/<slug>/ | Theme fatal | Switch to a default theme with wp theme activate twentytwentyfour. If the site recovers, the theme is the cause. |
syntax error or Parse error in any path | Bad PHP edit | Revert the last change to that file. Parse errors always point to a specific line. |
requires PHP version X or higher or cannot redeclare on a core function | PHP version mismatch | Check the hosting PHP version. Plugins often require PHP 8.0 or 8.1. Downgrade the plugin or upgrade PHP. |
Path contains wp-includes/ with Call to undefined function | Missing or corrupt core file | Reinstall core with wp core download --force --skip-content. |
Step 4. Confirm the fix
After the suggested change, ask the user to reload the page. If the page recovers, revert WP_DEBUG_DISPLAY back to whatever it was (most production sites leave it unset or false). Keep WP_DEBUG_LOG on if the user wants continued visibility.
If the site is still broken, re-read the log. A second error often surfaces only after the first one is fixed.
Example
User: /wordpress-devkit:wp-debug site is blank after plugin update
Skill:
- Reads
wp-config.phpand confirmsWP_DEBUGis already on. - Greps
wp-content/debug.logforPHP Fatal error, finds:PHP Fatal error: Uncaught Error: Call to undefined function WC() in /var/www/html/wp-content/plugins/acme-addon/src/hooks.php:18 - Reports: the plugin
acme-addonassumes WooCommerce is active. Either WooCommerce was deactivated or it failed to load. Fix options:- Deactivate
acme-addonwithwp plugin deactivate acme-addon. - Or reactivate WooCommerce with
wp plugin activate woocommerce. - Or guard the call in
acme-addon/src/hooks.php:18so it only runs when WooCommerce is loaded:if ( function_exists( 'WC' ) ) { $cart = WC()->cart; }
- Deactivate
- Suggests reloading the page to confirm.
Do not
- Do not ask the user to set
WP_DEBUG_DISPLAY = trueon a production site. It leaks file paths and stack traces to visitors. - Do not delete
debug.log. Read it. Deleting the log loses history that is often needed to confirm the fix. - Do not run
wp db repairor modify the database as a first step. WSOD is almost always PHP, not SQL. - Do not edit plugin or theme code to swallow the error. Fix the cause, not the symptom.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

