5xx server errors: what the codes actually mean
All 5xx codes mean the server side could not complete the request. The differences sit in which layer failed and which part of the stack you should look at first.
- 500 Internal Server Error. A generic failure inside the application. For WordPress this usually points at a fatal PHP error, an exhausted memory limit, or a broken plugin. The web server caught the failure and surfaced 500 because it has nothing more specific to report.
- 502 Bad Gateway. The web server in front (nginx, a reverse proxy, a load balancer) reached PHP-FPM or another upstream and got back an invalid or empty response. The application crashed, the worker died, or the upstream connection broke mid-request.
- 503 Service Unavailable. The server is up but actively refusing the request. For WordPress, two very different cases produce 503: real overload (no PHP workers free) and the maintenance flag set by a stuck or interrupted update. The fix is completely different in each case.
- 504 Gateway Timeout. The web server reached PHP-FPM but waited longer than the timeout for a response. The upstream is alive but not finishing the request in time, often because of a slow query, a stuck cron job, or an outbound API call that never returns.
The dedicated articles above for 500, 502, 503, and 504 explain how to tell these apart, which logs surface the right detail, and which checks you can run safely before touching anything in production.
