The WordPress error bad gateway 502 is an invalid server error. When you request a web page, and the severe gets an invalid response from another severe, bad gateway error occurs. If the issue is attached to your computer or networking equipment, you can try these tricks:
Refresh the page.
Check if the site is down for others: try these tools
Try accessing another browser
Clear cache and cookies of your browser.
If none of the above helps, connect with a WordPress support expert.