How to Fix 500 and 502 Errors in WordPress

500 and 502 errors can occur on your WordPress site, and can also be hard to fix since the errors themselves are providing few pieces of information about what’s going on. In order to help you fix those errors, here’s a simple and handy guide.

Caution: always backup your site before proceeding!
What Are the Causes of These Errors?
It’s important to note that WordPress itself isn’t at fault: 500 errors can occur on every website, and for a wide variety of reasons. Those errors are typically frustrating and demand a lot of troubleshooting since the error itself doesn’t provide any pointer about what can be wrong.