WordPress sites generate distinctive error patterns: 404 from broken permalinks, 500 from plugin/theme conflicts and PHP errors, 502 from PHP-FPM or upstream issues, 503 from maintenance mode stuck or memory exhaustion, 504 from slow queries or external API timeouts. This guide covers the WordPress-specific diagnosis-and-fix workflow per error. Pair with HTTP error guide.
Edit wp-config.php: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false). Errors log to /wp-content/debug.log. Critical first step — diagnosis without logs is guessing.
Check Settings → Permalinks → click Save (re-flushes rewrite rules — fixes most 404s). For broken inbound links, install Redirection plugin to catch and 301 them. Update internal links pointing to dead URLs.
Look at debug.log for PHP fatal errors. Common causes: plugin update broke compatibility, theme conflict, exhausted memory limit, corrupted .htaccess. Disable all plugins via /wp-content/plugins rename, re-enable one by one to identify culprit.
Server-level errors. Check PHP-FPM status (managed hosts have logs). Often caused by: long-running queries, external API timeouts, exhausted PHP workers. Increase PHP timeout (php.ini max_execution_time), increase memory_limit, kill stuck queries via Query Monitor or hosting dashboard.
WordPress 'Briefly unavailable for scheduled maintenance' page that doesn't go away: delete .maintenance file from root via FTP. True 503 (server-level): check hosting account for resource limits hit. Increase plan or optimise resource-heavy plugins.
WordPress 'Allowed memory size exhausted' messages. wp-config.php: define('WP_MEMORY_LIMIT', '256M');. If still failing on admin actions: define('WP_MAX_MEMORY_LIMIT', '512M');. If host caps below this, contact host or upgrade plan.
Uptime Robot, Better Uptime, or hosting-built-in monitoring. Alert on 5xx errors immediately. Track 404 rate via Search Console; spikes indicate broken links or removed pages.