---
title: "502 Bad Gateway in WordPress"
canonical: "https://lemwatch.com/http-status-codes/502/in-wordpress"
platform: "WordPress"
last_verified: "2026-08-11"
source: "https://lemwatch.com"
---

# HTTP 502 Bad Gateway in WordPress

**Platform** — WordPress — the world's most popular CMS.

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

## Cause on this platform

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

## Fix on this platform

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


## Generic reference

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

_Canonical HTML page: https://lemwatch.com/http-status-codes/502/in-wordpress_
