502 Bad Gateway

How-to
How to Fix 502 Bad Gateway Error on Nginx and WordPress
A 502 on an Nginx WordPress site almost always means PHP-FPM or another backend didn’t answer properly. Here’s the order I check things in, from restarting services and reading logs to timeouts, buffers, Cloudflare and plugin conflicts.