Introduction

Sometimes, when you visit your website, the 502 Bad Gateway error appears that can make you feel annoyed. So, if you want to Fix 502 Bad Gateway Error, we would like to help you do that with the instruction in the blog today.

fix 502 bad gateway error 1

First of all, let us bring you some fundamental information about this error. Whenever you access a website, the browser you are using will send a request to the WordPress hosting server. After that, the hosting server will find the page, then send it to your browser with a status code. However, you won’t see the status code. In some cases, because of the errors such as 503 Service Unavailable, 404 not found, and much more, the status code will appear with the error message.

The 502 Bad Gateway error is one of the most popular errors when you develop a WordPress website. This error is caused by many different factors. However, the most common reason is that the request you send is taking too long for the server to respond. This means the error may appear because of the high traffic or something wrong with the WordPress plugins or themes. Besides that, a server misconfiguration can cause this error.

So, what you should do to solve the trouble? Let’s explore the 5 steps below.

The method to Fix 502 Bad Gateway Error in WordPress

Reloading the website

Firstly, you may see the error when the site traffic is increasing or the server resources are low. In this case, don’t worry since the error will disappear automatically in a few minutes. Thus, all you need to do is reload the website. If the website returns to normal, you do not need to continue to the next steps. On the other hand, if this error still occurs frequently, then let’s continue to try the following steps.

Clearing the cache of the browser

Sometimes the error happens as the browser is loading the site from the cache. Therefore, to tackle the trouble, you just need to clear the browser cache.

Let’s open the browser, then go to the three dots icon on the top right of the screen. After that, simply go ahead More Tools -> Clear Browsing Data to clear the site cache. After clearing, don’t forget to load your site again to check the result.

fix 502 bad gateway error 2

Besides that, if the error occurs because of the browser cache, you can also utilize another browser to fix the trouble.

Disabling the CDN or Firewall

The next step you need to do after trying the two steps above but they don’t work is disabling the CDN or firewall. If the error is fixed after disabling, you need to get in touch with your CDN service provider to support you. When the problem is addressed completely, you can enable the CDN again.

Updating Themes/ Plugins for your WordPress site

You can try the fourth step if the error is still there. Now, you need to check your WordPress themes and plugins.

First of all, let’s deactivate all the plugins by using FTP. Then, open your front-end site and check if the error has been fixed. If yes, you need to activate a one-by-one plugin to find exactly which plugin causes the error. After that, simply search for an alternative plugin. You can also get in touch with the plugin author to ask about the issue.

If the error is not coming from plugins, you should check the WordPress theme. So, you need to switch your current theme through phpMyAdmin. Then, let’s use the default theme and access your site to check. If the error disappears, well done. If not, let’s move on to the last step.

Checking the Hosting Server

If the four steps above can’t help you tackle the problem, the error may come from your hosting server. Hence, you should contact your hosting provider for support. Don’t forget to tell them that you tried troubleshooting with 4 steps but they don’t work. So, the hosting provider will help you find the solution effectively.

Wrap Up

In conclusion, we have already shared with you some solutions to Fix 502 Bad Gateway Error in WordPress. So, we hope that it can help you to tackle the trouble effectively. If you have any queries, why don’t you leave your comment below? Last but not least, if you wish to own a responsive and attractive theme for your site, let’s take a look at many Free WordPress Themes here.

5/5 - (2 votes)
LT Digital Team (Content & Marketing)
Latest posts by LT Digital Team (Content & Marketing) (see all)
All-In-One Membership Access PRO version of all 500+ all Joomla! templates and WordPress themes. Just from $7.25/MO Learn more
🎉 Merry xMas & Happy New Year sale! Grab 50% Off for everything on today, don't miss it. Coupon code: XMASNEWYEAR Redeem Now