How to fix 502 error in WordPress?

7 views December 7, 2018 ankitrtm 0

What’s the most annoying thing when you surf the net? The 502 bad gateway error, of course.

Wanna know another equally annoying secret about 502? It can be solved by one of the 9 ways given below.

It is annoying because you need to go on a trail and error basis and see what works. Sometimes it’s the fault with the server. Sometimes it is your faulty network router. Rest of the times it is due to some part of your unproperly custom coded WordPress site.

So today, let’s teach you how to fix this error. But before you proceed, you need to know what exactly this 502 error is?

What is the 502 bad gateway?

It’s bad communication between two servers. Just imagine you, and your mom argues over something. And discussion goes bad. Now your mom gets angry. She shows you the 502 error to you.

That’s what 502 error or 502 bad gateway is.

Let’s have your beloved WordPress (mom) running up in no time.

Fix 502 error (easiest to toughest)

It could be a network connection issue

  1. One reason why 502’s occur could be due to bad IP connection and if this is the issue, refreshing the webpage should solve this temporary problem.
  2. Still here? Try closing all open tabs and active browsers and start afresh. If this is a network issue, this should solve your temporary problem. Still here? Try restarting your network equipment. Next, try opening your site in a different browser.
  3. If you are still here, try clearing your browser cache and cookies. To do that go to the three dots option at the top right corner of Chrome. Click on more tools and then on clear browsing cache.
  4. Next, try flushing your DNS. In windows, press the windows and R keys simultaneously and run the cdm. Now add this code:
ipconfig /flushdns

It could be because of CDN

  1. Disable your CDN temporarily. If you are using a free CDN, then this step is a must for you.
  2. If you are using the free “CDN enabler” plugin, deactivate it and then check. If your access to Dashboard has been locked, rename the plugin folder from to”cdn-enabler” to “cdn-enabler_old”. All plugins connected with your CDN will also get disabled.

Incorrect plugin or theme code

  1. Deactivate all the plugins. Does your site still show the error? If yes, you have to manually activate every single plugin and check your site every single time. If you have a hundred plugins, you need to do it a hundred times.

Find the faulty plugin and replace it with its alternative.

Raise a support ticket, and we’ll help you save your sanity.

  1. If you are still reading this, well, my friend, you need to check the codes of your plugins and themes. Somewhere, something has gone wrong with the coding. This usually happens if you’ve installed them from third-party services.

You need a certified WordPress Developer to solve this.

Raise a support ticket here to save your sanity.

  1. Finally, you can call customer service number provided by your host. You have done everything from your side.

Have a power nap now.

Our features are:

We offer various services such as :

  1. Creating a WordPress website from scratch.
  2. Optimising WordPress websites through SEO.
  3. Promoting WordPress sites through digital marketing.
  4. Custom development of WordPress sites.
  5. Writing the copy for WordPress sites.
  6. Cleaning hacked WordPress sites.

We also offer you the flexibility to choose your personalised plans made with the number of hours you want for each task. Pay only for the hours we work for. And all these services at just $10/hr!

Why choose us?  

We are not like the other players in this industry who maintain your WordPress site at such high rates! We create, optimize, promote and maintain your WordPress site. Choose us because we know listening to your business goals or woes is where most agencies go wrong. We understand that to grow. We need to know first.

Our expertise

Our projects ranged across various industries – be it writing, hospitality, education, e-commerce or even services. We got it all covered.

Know more about who we are and also check out our portfolio!

Was this helpful?