How do I fix a "502 Bad Gateway" error? Print

  • 0

A 502 means the web server got an invalid response from the PHP backend, usually during heavy load or a script timeout. It is often temporary.

  1. Wait a minute and refresh — transient 502s often clear on their own.
  2. Clear your browser and any CDN cache (Cloudflare's Purge Everything) to rule out a cached error page.
  3. If you run a heavy script or cron, it may be exhausting resources; optimize or stagger it.
  4. Check cPanel Errors and Resource Usage for limit-reached entries.
  5. Disable a recently added plugin or module that may be hanging.

If 502s persist across the whole site, it may be a server-level worker issue — open a ticket with the time and URL.


Was this answer helpful?

« Back