HTTP 502 in WordPress

PHP-FPM crashed or the upstream Nginx/Apache worker was killed (OOM on shared hosting).

Why WordPress returns 502

PHP-FPM crashed or the upstream Nginx/Apache worker was killed (OOM on shared hosting).

How to fix it

Raise `memory_limit` in php.ini, restart PHP-FPM, and check the host's process supervisor logs.

Where this surfaces in WordPress

WordPress admin, wp-cron output, or the site's frontend after a plugin/theme update.

WordPress — the world's most popular CMS.

What HTTP 502 means generally

A server acting as a gateway or proxy received an invalid response from the upstream server — common with Nginx, Cloudflare, and load balancers.

HTTP 502 Bad Gateway is what a proxy returns when the server behind it gives back a response the proxy can't use — empty, malformed, truncated, or no response at all. It is fundamentally a relay error: the proxy itself is healthy, but the actual application server upstream is broken, unreachable, or speaking the wrong protocol. Modern web stacks are full of proxies (Cloudflare → AWS ALB → Nginx → PHP-FPM), and 502 can come from any layer in that chain failing to talk to the next one.

Other common causes of 502

SEO impact

Persistent 502s cause the same deindexing risk as 500s, often worse because 502 frequently affects an entire site at once (when the origin is down, every page is down). CDN-level 502s during a Googlebot crawl can cause Google to throttle the entire site's crawl rate. A repeated pattern of 502s also lowers Google's confidence in your hosting stack, which affects ranking stability over months.

How to catch it next time

LemWatch distinguishes between brief, intermittent 502s (usually a deploy or restart, low priority) and sustained 502s (an actual outage, page-immediately). We also correlate 502s across regions so you know whether the issue is your origin, a single CDN PoP, or your registrar.