How to Fix 502 Bad Gateway Error in WordPress Site

Dear readers, let’s know How to Fix 502 Bad Gateway Error in WordPress Site, 502 Bad Gateway error fix, How do I fix 502 Bad Gateway, What causes a 502 Bad Gateway error, Does 502 Bad Gateway mean blocked

When you visit your WordPress site and suddenly you see 502 Bad Gateway error. So you will think that what has gone wrong in your site due to which your site is showing 502 error code.

Most of the time, this error resolves on its own within a few minutes, but if it doesn’t get better on its own, don’t worry. In this article I will tell you how to fix 502 Bad Gateway error.

How to Fix 502 Bad Gateway Error in WordPress Site

1. Reload the page

If you see 502 bad gateway error on your site, the easiest and first thing to do is wait a minute then reload your page. Now your site will be open again. Or you can open your site by opening a different browser.

Also, you can see the down status of your site by visiting the site of

2. Clear Browser Cache

Whenever you face such bad gateway error message, don’t forget to clear your browser cache. Sometimes it can also be caused by browser cache.

3. Disable CDN

Your CDN (content delivery network) can also be the reason for 502 server error. If you are using a 3rd-party CDN, disable your CDN. Then you can check by visiting your site.

4. Check DNS Servers

Check your DNS servers. DNS servers can also be the reason for bad gateway errors on your site.

5. Check Plugins and Themes

If you have misconfigured Caching plugins on your site, then it can generate 502 error code. To fix this, deactivate the plugin.

If you are not able to access the WordPress dashboard, then you have to log in to the cPanel of your web hosting, then go to the root directory and click on “wp-content”.

After that rename the plugins folder to plugins_old. Doing this will deactivate all the plugins on your site.

By deactivating the plugin

Now visit our site. If your site is fixed, rename your plugins_old folder to “plugins” again.

Now log in to your WordPress dashboard and activate each plugin in turn. After activating each plugin, visit 4-5 pages of your site.

Note: When you rename your plugins_old folder again to “plugins”, all the plugins on your site remain deactivated.

Similarly for the theme, go to the wp-content folder and rename the Theme folder. Then visit your site.

6. Delete Browser Cookies

Similar to clearing browser cache. If you clear the cookies stored in the browser, the 502 bad gateway error can be fixed.

8. Restart your computer.

If you are seeing 502 bad gateway errors on more than one website, restarting the computer may help you in these cases.

9. Restart Networking Equipment

Restart your networking equipment (modem, router, or other networking devices). Your networking device can also be the reason for 502 bad request.

Read more article:

If the 502 bad gateway error is still not fixed from your site, then for this you have to contact your hosting provider or any developer.

Leave a Comment