WordPress is your core install plus a theme plus a pile of plugins plus your own customizations. When something breaks, it is almost always at the seam between two of those. The good news: WordPress is loud about its errors if you let it talk. The bad news: most people do not let it talk, and they end up guessing.

This is the order that finds the bug fastest. Do not skip steps.

Diagram of a WordPress robot holding a debug checklist.

1. Read the error

If WordPress shows you an error, it is telling you the file, the line, and the function. Fatal error: Allowed memory size exhausted in /wp-content/plugins/somewhere.php on line 142 means “that file, that line”. Eighty percent of the time, the error names the culprit directly. Read it like a sentence, not a wall of text. 😺

2. Turn on real error reporting

In wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Errors now write to /wp-content/debug.log instead of the white-screen-of-mystery. WP_DEBUG_DISPLAY = false keeps visitors from seeing the errors on the live site while you investigate. More on the PHP error log here.

3. Binary-search the plugins

If the error does not name a file, the plugin causing it is hiding in your active set. The fastest method is bisection: disable half your plugins. If the error stops, the cause is in the disabled half. Re-enable a quarter. Keep halving. With 30 plugins you find it in 5 toggles instead of 30. Most people disable one at a time and give up; do not be most people.

4. Check the browser side too

If the page looks broken but PHP is quiet, the bug is in JavaScript or a failed request. Open Chrome DevTools, watch the Console and Network tabs while you reproduce the issue. A red request or a JS exception is the bug, usually. Quick guide here.

5. Switch to a default theme briefly

If steps 1-4 all came back clean and the bug persists, switch to Twenty Twenty-Five for ten minutes. If the error vanishes, your theme is the cause and you now know that with certainty. Switch back and dig into your theme’s functions.php.

Common errors we have written about

A word on plugin support

If you have followed the steps above and isolated the bug to a specific plugin, congratulations: you can now file a useful support ticket. Plugin authors fix bugs fast when you give them the exact error, the file, the line, and what you were doing. Vague tickets (“it doesn’t work”) get ignored. Precise tickets (“line 142 of foo.php throws X when I do Y”) get fixed within the week, often the same day. 😺