When it comes to WordPress there are a lot of errors that can be downtime frustrating and confusing. Any error that makes your WordPress site made from WordPress free themes unusable is a genuine cause of concern because it means poor SEO rankings, lost revenue and a lot of unnecessary stress for you.
A standout amongst the most infamous errors to ever grace the web is the 502 bad gateway error. It is a very annoying and frustrating problem as it can be caused by a lot of different things, which make it difficult to investigate and fix the 502 bad gateway error.
Read more below about what causes this 502 bad gateway error and some solutions on how to quickly resolve it.
What is a 502 Bad Gateway Error?
A 502 bad gateway error is activated when your WordPress hosting server gets an invalid reaction for the requested page.
The bad gateway error is one of the common WordPress errors that you may experience on your site. It tends to be brought about by various reasons and relying upon your server the error message may likewise vary in looks somewhat.
When you visit a site, your browser sends a request to the hosting server. The hosting server at that point finds the page and sends it back to your browser with the status code. Mostly, you wouldn’t see this status code. But in case, if there is arising of an error the status code is shown with an error message.
The widest explanation behind a 502 bad gateway error is the point at which your demand takes unreasonably long for the server to respond.
This delay can be a temporary glitch brought about by high traffic. Also, this glitch can be caused by a poorly coded WordPress free themes of plugins. To wrap things up, it can likewise occur because of a server misconfiguration.
The 502 bad gateway error can and takes many different forms such as:
- Error 502
- 502 Bad gateway NGINX
- 502 Proxy error
- 502 Service Temporarily Overloaded
- HTTP Error 502 Bad Gateway
- 502. That’s an error. The server encountered a temporary error and could not complete your request. Please try again in 30 seconds. That’s all we know.
How to Fix a 502 Bad Gateway Error in WordPress?
This error is usually caused when your server is unable to find the cause of the invalid response. This means that we will try different troubleshooting steps until we find the problem. This error might seem problematic but is incredibly easy to fix. Just have little patience to try out the following solutions.
- Refresh and Reload your Website:
At times your server might take more time to respond because of expanded traffic or low server resources. All things considered, the issue may accordingly disappear in almost no time.
One should try reloading the site page that you are viewing to check if the error cleans on its own. Additionally, try a different browser or device to see if the error resolves itself.
However, if this fixed your problem, at that point you don’t have to read any further. In any case, on the off chance that you see this error frequently, at that point, you have to keep reading and move on to the next solution in this article as there might be something different that needs fixing.
- Clear your Browser Cache:
Are you unable to fix the 502 bad gateway error even after refreshing your browser? If so, your browser might be shown to you the error page from the cache.
Indeed, even after the issue is fixed, you may see the 502 bad gateway error because of the fact that the browser is loading your site from the cache.
To fix this, clients with Windows/Linux operating frameworks can press Ctrl + F5 buttons and Mac OS clients can press CMD + Shift + R buttons on their keyboards to refresh the page. You can likewise also remove the cache from your browser history as well.
Once you have cleared the cache, try and reload your WordPress site again. Similarly, you can use a different browser to troubleshoot if the problem is occurring because of the browser cache. If you see an error on every browser, then continue reading.
- Disable you CND or Firewall:
On the off chance that you are utilizing a CDN service or site firewall on your site, at that point, it is conceivable that their servers are not acting properly. To check this, you will need to temporarily disable your CND.
As it is once disabled, it will evacuate the extra layer that has been made between your browser and the hosting server. Your site will presently load completely from your server and in the event that the issue was brought about by the CDN/firewall service, then it will get fixed at this point.
One can then contact their CND service provider for support. As soon as the issue is resolved, you can then go ahead and enable the CND again.
- Update WordPress Themes and Plugins:
Can’t seem to fix the error so far? Then your problem lies within your themes and plugins.
First, you will have to deactivate all your WordPress plugins via the FTP. Then visit your WordPress site made from the WordPress free themes to check if the error is solved.
If it is resolved, then one of your plugins was causing the 502 bad gateway error problem. You have to now activate your plugins one by one while reloading your site after each activation.
Repeat this until you find the plugin that was causing the problem. This problematic plugin will obviously recreate the 502 bad gateway error on activation, which might lock you out of the admin area.
You can find an alternative plugin or can contact the plugin author for support.
If deactivating plugin did not solve your issue, then one should check their WordPress theme. You will need to switch the WordPress theme via phpMyAdmin.
After switching your theme to the default WordPress theme, visit your site to check if it’s working. If still there is an error then continue reading.
- Check the Hosting Server:
Still can’t seem to fix the 502 bad gateway error on your WordPress site even after trying the above solutions? Then it is likely an issue with your hosting server.
You need to contact your hosting provider, service and let them know about the issue and get professional help. All the good hosting companies will be able to quickly fix the issue if it was caused by a server misconfiguration.
While a bit frustrating and confusing, fixing a 502 bad gateway error for your website created from the WordPress free themes is easy with the solutions we provided in this post. We hope this article helped you in fixing the error.