How to Fix “502 Bad Gateway” Error on Siteground

If you are getting a “502 Bad Gateway” blue screen of death on Siteground, and your site is a WordPress site, and it is not going away by itself, here’s how to fix it.

502 Bad Gateway error on Siteground

The error message claims it’s a temporary error, but when it happened to me, I waited an hour and a half and it was still in failure mode, so I got on chat with Siteground support who quickly identified it as a caching problem. He cleared it and immediately the site was back up and unharmed!

But, you can skip the call or chat with Siteground and clear up this problem yourself!

How to Fix It #1

Log into your Siteground account, then go to Websites -> Site Tools (for the site that is down) -> Speed -> Caching -> Dynamic Cache.

Once there, click the broom icon in the lower right corner as shown:

How to clear Siteground dynamic cache
How to clear Siteground dynamic cache

If you have Memcached enabled, you should clear that one too, but it is usually not enabled by default.

Your site should be up immediately after this!

How to Fix It #2

If that doesn’t work, try toggling your PHP version. For example, if you’re running PHP 8.1, log into Siteground and change your PHP version to 8.0, wait a bit, then change it back to 8.1. This worked for me another time when I got this error.

To change your PHP version, go to Site Tools for that site -> Devs -> PHP Manager -> PHP Version, then click the pencil icon to change it.

How to change PHP version in Siteground
How to change PHP version in Siteground

Conclusion

Did that work for you? Please leave a message if either of these methods worked for you! Or, if you found a different solution, please tell me about that as well! Thanks, Brian.

Shares

Please Leave a Question or Comment

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments