Platform

WordPress Troubleshooting

Fix WordPress errors involving 500 responses, 502 gateways, database connections, plugins, themes, wp-config.php, PHP, and logs.

What breaks in WordPress

WordPress requests move through browser, DNS, CDN/cache, web server, PHP runtime, WordPress core, plugins, theme code, and the database. A visitor can only retry, test another browser, or report details. A site owner should identify the failing layer before editing plugins, .htaccess, or wp-config.php.

Start here by symptom

SymptomLikely layerBest path
Error establishing a database connectionDB credentials, host, or service healthDatabase connection error
500 after plugin/theme updatePlugin, theme, PHP fatal, or .htaccessWordPress 500
502 or gateway errorPHP-FPM, hosting limit, proxy, CDN, overloaded pluginWordPress 502
wp-admin unavailablePlugin/theme/PHP issueDisable plugins without admin
Credentials may be wrongwp-config.phpRepair database settings

Do not make it worse

Back up files and database before renaming plugin folders, editing .htaccess, or changing wp-config.php. Preserve the original value, screenshot, or copied file. If a host panel controls database credentials, update the panel and file together rather than guessing from memory.

Escalation template

URL affected:
Time and timezone:
Error shown:
Recent plugin/theme/PHP/cache changes:
Does wp-admin load:
Relevant PHP/nginx/Apache/database log line:
What was rolled back or tested:

Related topics

Use database errors for DB credentials and health, HTTP errors for status-code diagnosis, and nginx troubleshooting when the visible failure is a gateway or upstream error.

Errors

404 Not Found

Diagnose a 404 Not Found by checking the URL, deleted files, broken routes, redirects, permalinks, and server configuration.

500 Internal Server Error

Find the cause of a 500 Internal Server Error by checking logs, recent deploys, plugins, PHP failures, permissions, and rollback options.

502 Bad Gateway

Diagnose a 502 Bad Gateway by checking the proxy, CDN, upstream app, PHP-FPM, timeouts, and server logs before changing DNS.

502 Bad Gateway in WordPress

Troubleshoot a WordPress 502 by checking PHP-FPM, overloaded plugins, theme changes, cache/CDN layers, hosting limits, and logs.

Guides

Check WordPress file permissions

Check WordPress ownership and permissions when uploads, plugins, themes, cache files, or PHP includes fail after a migration or deploy.

Enable WordPress debug log safely

Turn on WP_DEBUG_LOG without displaying errors publicly so WordPress 500, white screen, plugin, theme, and PHP failures leave evidence.