{"id":764,"date":"2020-02-03T06:48:10","date_gmt":"2020-02-03T06:48:10","guid":{"rendered":"https:\/\/www.domainnamesanity.com\/blog\/?p=764"},"modified":"2020-04-06T06:32:51","modified_gmt":"2020-04-06T06:32:51","slug":"how-to-fix-502-bad-gateway-error-on-your-wordpress-site","status":"publish","type":"post","link":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/","title":{"rendered":"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"764\" class=\"elementor elementor-764\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-230899b0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"230899b0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7ff48571\" data-id=\"7ff48571\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-48deb20 elementor-widget elementor-widget-text-editor\" data-id=\"48deb20\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"breadcrumbs-bar\"><nav class=\"blog-breadcrumbs\">\n<ul>\n \t<li><a href=\"https:\/\/www.domainnamesanity.com\/\">HOME<\/a><\/li>\n \t<li class=\"bc-2nd\"><a href=\"https:\/\/www.domainnamesanity.com\/blog\/\">BLOG<\/a><\/li>\n<\/ul>\n<\/nav><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1c29e94 elementor-widget elementor-widget-theme-post-title elementor-page-title elementor-widget-heading\" data-id=\"1c29e94\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"theme-post-title.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d6ac49d elementor-widget elementor-widget-post-info\" data-id=\"d6ac49d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"post-info.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul class=\"elementor-inline-items elementor-icon-list-items elementor-post-info\">\n\t\t\t\t\t<li class=\"elementor-icon-list-item elementor-repeater-item-d9c2fd9 elementor-inline-item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text elementor-post-info__item elementor-post-info__item--type-custom\">\n\t\t\t\t\t\t\t\t\t\tBy Douglas Moore\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t<li class=\"elementor-icon-list-item elementor-repeater-item-6a0ea6c elementor-inline-item\" itemprop=\"datePublished\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-icon-list-text elementor-post-info__item elementor-post-info__item--type-date\">\n\t\t\t\t\t\t\t<span class=\"elementor-post-info__item-prefix\">Last Updated On<\/span>\n\t\t\t\t\t\t\t\t\t\tFebruary 3, 2020\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t<\/ul>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f51764 elementor-widget elementor-widget-theme-post-featured-image elementor-widget-image\" data-id=\"8f51764\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"theme-post-featured-image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"900\" height=\"675\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png\" class=\"attachment-full size-full wp-image-637\" alt=\"\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png 900w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error-300x225.png 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error-768x576.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-43ea192 toc-top elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"43ea192\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-85705ab\" data-id=\"85705ab\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-29c4035 table-of-contents elementor-widget elementor-widget-heading\" data-id=\"29c4035\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h6 class=\"elementor-heading-title elementor-size-default\">Table of Contents<\/h6>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9f76f1c elementor-widget elementor-widget-text-editor\" data-id=\"9f76f1c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul class=\"table-of-contents-list\"><li><a href=\"#what-is-a-502-bad-gateway-error\">What is a 502 Bad Gateway Error?<\/a><\/li><li class=\"sub-toc\"><a href=\"#variations-of-the-502-bad-gateway-error-message\">Variations of the 502 Bad Gateway Error Message<\/a><\/li><li class=\"sub-toc\"><a href=\"#what-causes-the-502-bad-gateway-error\">What Causes the 502 Bad Gateway Error?<\/a><\/li><li class=\"sub-toc\"><a href=\"#why-you-should-try-to-fix-the-502-gateway-error\">Why You Should Try to Fix the 502 Gateway Error<\/a><\/li><li><a href=\"#how-to-fix-a-502-bad-gateway-error-on-your-wordpress-site\">How to Fix a 502 Bad Gateway Error on Your WordPress Site<\/a><\/li><li class=\"sub-toc\"><a href=\"#reload-the-page\">1. Reload the Page<\/a><\/li><li class=\"sub-toc\"><a href=\"#check-if-the-website-is-available\">2. Check if the Website is Available<\/a><\/li><li class=\"sub-toc\"><a href=\"#restart-your-internet-router\">3. Restart Your Internet Router<\/a><\/li><li class=\"sub-toc\"><a href=\"#clear-your-browser-cache\">4. Clear Your Browser Cache<\/a><\/li><li class=\"sub-toc\"><a href=\"#flush-your-dns-cache\">5. Flush Your DNS Cache<\/a><\/li><li class=\"sub-toc\"><a href=\"#change-your-dns-address\">6. Change Your DNS Address<\/a><\/li><li class=\"sub-toc\"><a href=\"#temporarily-disable-your-firewall-cdn-and-proxy\">7. Temporarily Disable Your Firewall, CDN, and Proxy<\/a><\/li><li class=\"sub-toc\"><a href=\"#deactivate-plugins-and-themes\">8. Deactivate Plugins and Themes<\/a><\/li><li class=\"sub-toc\"><a href=\"#contact-your-host\">9. Contact Your Host<\/a><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-197d5d2 elementor-widget elementor-widget-text-editor\" data-id=\"197d5d2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>There\u2019s no shortage of errors you\u2019ll experience on WordPress &#8211; but that\u2019s not us saying it\u2019s no good &#8211; <a href=\"https:\/\/www.domainnamesanity.com\/blog\/what-is-wordpress\/\">it\u2019s <em>great<\/em>, in fact<\/a>. The thing is, errors and using the Internet pretty much come hand in hand. The <strong>502 Bad Gateway <\/strong>error is not limited to WordPress &#8211; it can happen on just about any website, big or small. Facebook, Gmail, Twitter, Cloudflare &#8211; all these giants occasionally suffer the <strong>502 Bad Gateway <\/strong>hiccup. It\u2019s only \u201cnatural.\u201d<\/p><p><img decoding=\"async\" class=\"aligncenter size-large wp-image-768\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/cloudflare-error-502-bad-gateway-1024x782.jpg\" alt=\"\" width=\"1024\" height=\"782\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/cloudflare-error-502-bad-gateway-1024x782.jpg 1024w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/cloudflare-error-502-bad-gateway-300x229.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/cloudflare-error-502-bad-gateway-768x587.jpg 768w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/cloudflare-error-502-bad-gateway.jpg 1414w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p><p class=\"image-description\"><strong>Error 502 Bad Gateway<\/strong><\/p><p>But just because it\u2019s a normal occurrence, doesn\u2019t make it any less frustrating (like your car breaking down or your parents inquiring about your dating life). Well, we\u2019ve prepared this article so that you can put an end to the <strong>502 Bad Gateway<\/strong> error and uh, reduce the stress in your life.<\/p><p>While some of the time the <strong>502 Bad Gateway<\/strong> error resolves itself quickly, there are some cases where it will take a bit of elbow grease on your part. Not to worry! We\u2019ll go over what causes this error code and how you can fix it. We\u2019ll troubleshoot and go over the easy solutions you can try to resolve the <strong>502 Bad Gateway<\/strong> error, and you\u2019ll have your WordPress website up and running again in no time!<\/p><h2 id=\"what-is-a-502-bad-gateway-error\" class=\"c-anchor\">What is a 502 Bad Gateway Error?<\/h2><p>Various <strong>500 <\/strong>error codes indicate different issues. <strong>502 Bad Gateway<\/strong> means miscommunication between servers. The <strong>HTTP 503 Bad Gateway<\/strong> error is a response code which indicates that one server received an invalid response from another server. Basically, the server which acted as a gateway (the <strong>reverse proxy server<\/strong>) didn\u2019t get the necessary information from the upstream server (<strong>origin server<\/strong>) so it didn\u2019t process the request.<\/p><p>But let\u2019s get into it a bit more to gain a better understanding of what that means.<\/p><p>Most web applications are hosted on multiple servers. WordPress is no exception &#8211; various parts of the platform are backed by different servers. For instance, WordPress is hosted by:<\/p><ul><li>A <strong>database server<\/strong> that supports the databases of different WordPress users<\/li><li>A <strong>web server<\/strong> that supports the files on WordPress websites<\/li><li>An <strong>application<\/strong> <strong>server<\/strong> that supports the various functionalities of the WordPress application &#8211; like login information, PHP code, and so on<\/li><li>A <strong>gateway server<\/strong> (or <strong>reverse proxy server<\/strong>) which runs website software like Apache and NGINX<\/li><\/ul><p>So as you can imagine, opening a website that runs on multiple servers, like WordPress, means that there\u2019s a whole lot of requests sent between servers for the content to come together and the page to load properly.<\/p><p>All requests are initially sent to the <strong>reverse proxy server<\/strong> which redirects them to the appropriate servers. Dynamic content and PHP requests are retrieved from the <strong>application server<\/strong>; database-related requests from the <strong>database server<\/strong>; media, themes, plugins, and JavaScript requests are retrieved from the <strong>web server<\/strong>, and so on.<\/p><p>So essentially, the 502 Bad Gateway error happens when one of the <strong>upstream servers<\/strong> (web server, database server, application server) sends an invalid response to the <strong>reverse proxy server<\/strong>.<\/p><p>In the 502 error code, the reverse proxy server is basically telling you that it couldn&#8217;t retrieve the content you needed.<\/p><h3 id=\"variations-of-the-502-bad-gateway-error-message\" class=\"c-anchor\">Variations of the 502 Bad Gateway Error Message<\/h3><p>The <strong>502 Bad Gateway<\/strong> error wears many hats. Underneath those hats, is the same old issue. Depending on the browser, operating system, or server that you\u2019re using, the 502 Bad Gateway error may appear as any of the following variations:<\/p><ul><li>\u201c502 Bad Gateway\u201d<\/li><li>\u201cHTTP Error 502 Bad Gateway\u201d<\/li><li>\u201c502 Service Temporarily Overloaded\u201d<\/li><li>\u201cError 502\u201d<\/li><li>\u201c502 Proxy Error\u201d<\/li><li>\u201cHTTP 502\u201d<\/li><li>\u201c502 Bad Gateway NGINX\u201d<\/li><li>\u201cTemporary Error (502)\u201d<\/li><li>\u201c502 Bad Gateway Cloudflare\u201d<\/li><li>\u201c502 \u2013 Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.\u201d<\/li><li>\u201c502 Server Error: The server encountered a temporary error and could not complete your request\u201d<\/li><li>\u201c502. That\u2019s an error. The server encountered a temporary error and could not complete your request. Please try again in 30 seconds. That\u2019s all we know.\u201d (Appears on <strong>Google<\/strong>)<\/li><li>\u201cBad Gateway: The proxy server received an invalid response from an upstream server\u201d<\/li><li>A blank white screen may also be an indication of the 502 Bad Gateway error.<\/li><\/ul><p><img decoding=\"async\" class=\"aligncenter size-large wp-image-766\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/502-bad-gateway-error-troubleshoot-1024x228.jpg\" alt=\"\" width=\"1024\" height=\"228\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/502-bad-gateway-error-troubleshoot-1024x228.jpg 1024w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/502-bad-gateway-error-troubleshoot-300x67.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/502-bad-gateway-error-troubleshoot-768x171.jpg 768w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/502-bad-gateway-error-troubleshoot.jpg 1364w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p><p class=\"image-description\">Another variation of the <strong>502 Bad Gateway<\/strong> error code which explains the issue and proposes how you can fix it<\/p><p>As you can see, in some cases you\u2019ll just get the error code, and in other cases the server may do a little troubleshooting to inform you of what may have caused the error. It may even suggest that you try loading the website again after several seconds, which is always a good idea.<\/p><h3 id=\"what-causes-the-502-bad-gateway-error\" class=\"c-anchor\">What Causes the 502 Bad Gateway Error?<\/h3><p>Sometimes the 502 bad gateway error is caused by server miscommunication and there won\u2019t be much for you to do except wait around. Some server-side errors include:<\/p><ul><li>One or all of the upstream servers are down<\/li><li>The server is overloaded (when <strong>Twitter<\/strong> displays the 502 error, the message reads \u201cTwitter is over capacity.\u201d Too many visitors can overload a website and cause this error.)<\/li><\/ul><p>Other times it may be caused by something on your end. In these cases, it\u2019s up to you to fix it and get your WordPress website up and running again! Some possible issues on your end are:<\/p><ul><li>Outdated browser cache or WordPress cache<\/li><li>Misconfigured\/faulty WordPress themes or plugins causing issues with the PHP script<\/li><li>Faulty Google extensions<\/li><li>Problems with your Internet connection<\/li><li>Issues with the DNS (domain name system)<\/li><li>Issues with the CDN (content delivery network)<\/li><\/ul><p>If the issue is on your end, there\u2019s plenty you can do to get it fixed. We\u2019ll go over the various easy solutions to the problem in a moment &#8211; but first, one last thing.<\/p><h3 id=\"why-you-should-try-to-fix-the-502-gateway-error\" class=\"c-anchor\">Why You Should Try to Fix the 502 Gateway Error<\/h3><p>If the problem is on your end, it\u2019s crucial that you try to fix it <em>as soon as possible.<\/em> No pressure, but waiting around isn\u2019t a great idea because a long-standing 502 error can have a <strong>negative impact<\/strong> on your website\u2019s <strong>SEO ranking<\/strong>. There\u2019s a big difference between your site being down for 5-10 minutes, and it being down for over 6 hours.<\/p><p>The issue is that Google crawlers will note the problem if it lasts too long. Namely, if the 502 bad gateway error is only around for 10 minutes before you get it fixed, the Google crawler will get the page information from the cache. Or maybe the crawler won\u2019t even get to visit your website before you get it up and running again.<\/p><p>But if your website is down for hours on end, the Google crawler may identify the error code as a site-level problem, which could negatively impact your SEO rankings. Your website may be bumped down later in the search results, and no one wants that to happen (especially not you!).<\/p><p>So without further ado, let\u2019s look at several solutions you can try to fix the <strong>502 Bad Gateway<\/strong> error on your WordPress website.<\/p><h2 id=\"how-to-fix-a-502-bad-gateway-error-on-your-wordpress-site\" class=\"c-anchor\">How to Fix a 502 Bad Gateway Error on Your WordPress Site<\/h2><p>The 502 bad gateway error may be a server-side or a client-side issue. We\u2019ll cover some easy solutions that you &#8211; the <em>client <\/em>&#8211; can try in order to fix it, and then also go over what you should do if the issue stems from the server.<\/p><h3 id=\"reload-the-page\" class=\"c-anchor\">1. Reload the Page<\/h3><p>OK, this does seem very simple and straightforward, but sometimes the simplest solution is the best one. If you, by chance, didn\u2019t try reloading the page, do so! Either click the little reload button in your browser, or hit the <strong>F5<\/strong> key on your keyboard. If the issue was on the side of the host &#8211; due to an overloaded server or a temporary glitch &#8211; your site may be up and running again by now.<\/p><h3 id=\"check-if-the-website-is-available\" class=\"c-anchor\">2. Check if the Website is Available<\/h3><p>Another thing you can try in order to identify the root of the problem is to check if the website is available for others and only down for you. If the website turns out to be only down for you, then it\u2019s likely that the problem can be fixed in-house &#8211; namely, by adjusting your browser settings, your DNS address, or resetting that moody, pouty router in the corner of your living room.<\/p><p>If, on the other hand, the website turns out to be down for everyone &#8211; and not just you &#8211; there are two possible answers to what\u2019s causing the problem:<\/p><ol><li><strong>Client-side issue<\/strong>: a problem with your WordPress website due to faulty plugins or themes. We\u2019ll go over how to fix this in a bit.<\/li><li><strong>Server-side issue<\/strong>: the website\u2019s server is down. In this case, you should contact your host, which is what we\u2019ll cover in this article as well.<\/li><\/ol><p>To check if the website is down for everyone or just you, visit <a href=\"https:\/\/downforeveryoneorjustme.com\/\">Down for Everyone or Just Me<\/a>, and you\u2019ll get your answer in a matter of seconds.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-754\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/is-website-down-for-everyone-or-just-me-1024x410.jpg\" alt=\"\" width=\"1024\" height=\"410\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/is-website-down-for-everyone-or-just-me-1024x410.jpg 1024w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/is-website-down-for-everyone-or-just-me-300x120.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/is-website-down-for-everyone-or-just-me-768x307.jpg 768w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/is-website-down-for-everyone-or-just-me.jpg 1165w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p><p class=\"image-description\">Visit <a href=\"https:\/\/downforeveryoneorjustme.com\/\">Down for Everyone or Just Me<\/a> to see if the website is down for everyone or just you<\/p><p>Type the domain of your WordPress website into the search bar and select <strong>or just me?<\/strong> This handy website tool will let you know if the website is <strong>offline<\/strong>, that is, down for everyone, or if it\u2019s only down for you.<\/p><p>Let us then look at some ways to resolve the issue in both cases. We will first go over what you can do if the problem is isolated to you, and then what you can do if the website is down for everyone.<\/p><h3 id=\"restart-your-internet-router\" class=\"c-anchor\">3. Restart Your Internet Router<\/h3><p>We\u2019re back to the good old <em>have you tried turning it off and on again?<\/em> The reason why you\u2019re getting the 502 bad gateway error may simply be that your router is at it again.<\/p><p>To restart your router, simply turn it off by pressing its <strong>power<\/strong> button or unplug its cable. Wait for about 40 seconds, and then turn it on again, or plug it back in. Once the router reboots and all the pretty lights on it are glowing, try loading the website again. Still down? No worries, let\u2019s keep going!<\/p><h3 id=\"clear-your-browser-cache\" class=\"c-anchor\">4. Clear Your Browser Cache<\/h3><p>All browsers (Chrome, Mozilla, Microsoft Edge) store the data from your previous internet activity in their cache. This is information such as browsing history, login details, and cookies, which enable the browser to display the websites more quickly and smoothly on your upcoming visits.<\/p><p>Sometimes, though, the browser cache can contain outdated information that will do more harm than good, and cause issues like the 502 bad gateway error message. This may be because the website has been updated to a newer version since your last visit (like it can be a WordPress update that you weren\u2019t aware of), and a glitch caused by old cache can cause it to malfunction.<\/p><p>The easiest way to check if the 502 error code is caused by outdated browser cache is to try opening the website in <strong>Incognito mode<\/strong>. When a browser, like Chrome, is in Incognito mode, it doesn\u2019t store the regular data that ends up in your cache, like previous internet searches (i.e. browser history), login details, or cookies.<\/p><p>If you manage to access the website in Incognito mode, it\u2019s quite possible that the issue is caused by your browser\u2019s outdated cache. So the next step would be clearing the cache. We will use Google Chrome as an example to go through these two steps.<\/p><p>To check if the website loads in Incognito mode, select the <strong>Customize and control Google Chrome <\/strong>button at the top right corner of the screen, and click on <strong>New Incognito Window<\/strong>. Or, you could just hit <strong>Shift + Ctrl + N <\/strong>at the same time.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-623\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-open-an-incognito-window-in-Chrome.jpg\" alt=\"\" width=\"678\" height=\"446\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-open-an-incognito-window-in-Chrome.jpg 678w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-open-an-incognito-window-in-Chrome-300x197.jpg 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/p><p class=\"image-description\">You can click on <strong>New incognito window <\/strong>or press <strong>Shift + Ctrl + N <\/strong>to open Chrome in Incognito<\/p><p>Try loading the website in Incognito.<\/p><p>If the website loaded without the 502 bad gateway error, you now need to delete your browser cache.<\/p><p>To clear your browser cache:<\/p><ol><li>Go to <strong>Customize and control Google Chrome &gt; More Tools &gt; Clear browsing data<\/strong>. Alternatively, press <strong>Ctrl+Shift+Delete.<\/strong><\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-613\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-clear-your-cache-and-cookies-in-Chrome.jpg\" alt=\"\" width=\"560\" height=\"456\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-clear-your-cache-and-cookies-in-Chrome.jpg 560w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-clear-your-cache-and-cookies-in-Chrome-300x244.jpg 300w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p><p class=\"image-description\">How to clear your <strong>browsing data<\/strong> in Chrome<\/p><ol start=\"2\"><li>Check <strong>all<\/strong> the boxes to clear your entire browsing data. This includes:<\/li><\/ol><ul><li><strong><strong>Browsing history<\/strong><\/strong><\/li><\/ul><ul><li><strong>Cookies and other site data<\/strong><\/li><\/ul><ul><li><strong>Cached images and files<\/strong><\/li><\/ul><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-750\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/clear-browsing-data.jpg\" alt=\"\" width=\"508\" height=\"470\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/clear-browsing-data.jpg 508w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/clear-browsing-data-300x278.jpg 300w\" sizes=\"(max-width: 508px) 100vw, 508px\" \/><\/p><p class=\"image-description\">Check all the boxes to clear your browsing history<\/p><ol start=\"3\"><li>Click on <strong>Clear data.<\/strong><\/li><\/ol><ol start=\"4\"><li><strong> Restart your browser.<\/strong> Close your browser window and then open it again, to make sure that the changes have taken place.<\/li><\/ol><ol start=\"5\"><li><strong> Try loading the website again.<\/strong> If the issue was caused by outdated browser cache, you should now be able to access it without the 502 bad gateway error!<\/li><\/ol><h3 id=\"flush-your-dns-cache\" class=\"c-anchor\">5. Flush Your DNS Cache<\/h3><p>Playing around with your DNS settings can get the 502 bad gateway error fixed. An outdated DNS cache is one of the things that may be causing the issue.<\/p><p>Flushing your local DNS cache, like clearing your browser cache, can work to fix the 502 bad gateway error. And doing it is really easy.<\/p><p>To flush your DNS cache:<\/p><ol><li>Go to your <strong>Command Prompt.<\/strong> You can do this by typing <strong>CMD<\/strong> into the search bar at the bottom of your screen, or pressing the <strong>Windows<\/strong> key and then typing in <strong>CMD.<\/strong><\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-756\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/open-command-prompt-flush-DNS-cache.jpg\" alt=\"\" width=\"664\" height=\"374\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/open-command-prompt-flush-DNS-cache.jpg 664w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/open-command-prompt-flush-DNS-cache-300x169.jpg 300w\" sizes=\"(max-width: 664px) 100vw, 664px\" \/><\/p><p class=\"image-description\">Your <strong>Command Prompt<\/strong> will pop up<\/p><ol start=\"2\"><li>Type in <strong>ipconfig \/flushdns<\/strong> next to your PC\u2019s username, and then hit <strong>Enter <\/strong>to <strong>flush your DNS cache<\/strong>.<\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-760\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/flush-DNS-command-prompt.jpg\" alt=\"\" width=\"492\" height=\"174\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/flush-DNS-command-prompt.jpg 492w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/flush-DNS-command-prompt-300x106.jpg 300w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/p><p class=\"image-description\">Type <strong>ipconfig \/flushdns<\/strong> into your <strong>CMD<\/strong> to flush your DNS cache<\/p><p>If the flush was successful, the screen will show the following two lines:<\/p><p><strong>Windows IP Configuration<\/strong><\/p><p><strong>Successfully flushed the DNS Resolver Cache.<\/strong><\/p><ol start=\"3\"><li><strong> Reset your PC. <\/strong>You\u2019ll need to restart your computer for the changes to take effect.<\/li><\/ol><ol start=\"4\"><li><strong> Try loading the website again.<\/strong> If the issue was caused by outdated DNS cache, you should now be able to access your WordPress website without the 502 bad gateway error.<\/li><\/ol><h3 id=\"change-your-dns-address\" class=\"c-anchor\">6. Change Your DNS Address<\/h3><p>Normally, your DNS is obtained automatically by your internet provider. See:<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-755\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/obtain-DNS-server-address-automatically.jpg\" alt=\"\" width=\"393\" height=\"448\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/obtain-DNS-server-address-automatically.jpg 393w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/obtain-DNS-server-address-automatically-263x300.jpg 263w\" sizes=\"(max-width: 393px) 100vw, 393px\" \/><\/p><p class=\"image-description\">By default, your DNS and IP addresses are obtained automatically<\/p><p>In some cases, the automatically obtained DNS can be the source of the 502 bad gateway error if the server is overloaded or down.<\/p><p>Not to worry &#8211; changing your DNS address is both easy and safe.<\/p><p>For this step, we recommend using one of two popular public DNS addresses &#8211; either <strong>Google<\/strong>\u2019s or <strong>Cloudflare<\/strong>\u2019s free DNS\u2019s. They\u2019re both fast and reliable, so it\u2019s up to you whether later on you want to stick to them, or just use it as a temporary measure to resolve the 502 error.<\/p><p><strong>Note:<\/strong> If you\u2019re already using one of these public DNS addresses, the solution may be reverting back to an automatically obtained DNS address. So if that\u2019s the case for you, just click on <strong>Obtain DNS server address automatically <\/strong>from the appropriate window.<\/p><h4>Changing Your DNS Address in <strong>Windows<\/strong>:<\/h4><ol><li>Go to <strong>Control Panel.\u00a0<\/strong><\/li><\/ol><ol start=\"2\"><li>Go to the<strong> Network and Sharing Center<\/strong>. Type in \u201cnetwork\u201d into the Control Panel search bar to find it more quickly.<\/li><\/ol><ol start=\"3\"><li>Click on <strong>Change adapter settings.<\/strong> As you can see from the image below, it\u2019ll be on the left side of the window.<\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-746\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-adapter-settings.jpg\" alt=\"\" width=\"868\" height=\"592\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-adapter-settings.jpg 868w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-adapter-settings-300x205.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-adapter-settings-768x524.jpg 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/p><p class=\"image-description\">Select <strong>change adapter settings<\/strong> from the <strong>Network and Sharing Center<\/strong><\/p><ol start=\"4\"><li><strong> Left-click <\/strong>on the <strong>Wi-fi <\/strong>icon. Select <strong>Properties.<\/strong><\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-622\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-fix-the-your-connection-is-not-private-error-by-changing-your-DNS-properties.jpg\" alt=\"\" width=\"356\" height=\"342\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-fix-the-your-connection-is-not-private-error-by-changing-your-DNS-properties.jpg 356w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/How-to-fix-the-your-connection-is-not-private-error-by-changing-your-DNS-properties-300x288.jpg 300w\" sizes=\"(max-width: 356px) 100vw, 356px\" \/><\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-771\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/wi-fi-properties-1.jpg\" alt=\"\" width=\"822\" height=\"434\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/wi-fi-properties-1.jpg 822w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/wi-fi-properties-1-300x158.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/wi-fi-properties-1-768x405.jpg 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/p><p class=\"image-description\">Click on <strong>Properties<\/strong> to reconfigure your DNS address<\/p><ol start=\"5\"><li>Click on <strong>Internet Protocol Version 4 (TCP\/IPv4), <\/strong>and then on the <strong>Properties <\/strong>button below the list.<\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-749\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-IPv4-properties-to-fix-DNS-error.jpg\" alt=\"\" width=\"344\" height=\"461\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-IPv4-properties-to-fix-DNS-error.jpg 344w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-IPv4-properties-to-fix-DNS-error-224x300.jpg 224w\" sizes=\"(max-width: 344px) 100vw, 344px\" \/><\/p><p class=\"image-description\">Select <strong>Properties <\/strong>to change your DNS address<\/p><ol start=\"6\"><li>Check the circle next to <strong>Use the Following DNS Server Addresses.\u00a0<\/strong><\/li><\/ol><ol start=\"7\"><li>Type in the <strong>new values<\/strong> for the DNS address of your choosing (Google or Cloudflare) in the <strong>Preferred DNS server <\/strong>and <strong>Alternate DNS server <\/strong>fields.<\/li><\/ol><p>If you want to use Cloudflare\u2019s public DNS, type in the following values:<\/p><p><strong>1.1.1.1 <\/strong>for <strong>Preferred DNS server<\/strong><\/p><p><strong>1.0.0.1<\/strong> for <strong>Alternate DNS server<\/strong><\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-747\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-DNS-server-address-to-cloudflare.jpg\" alt=\"\" width=\"392\" height=\"448\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-DNS-server-address-to-cloudflare.jpg 392w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-DNS-server-address-to-cloudflare-263x300.jpg 263w\" sizes=\"(max-width: 392px) 100vw, 392px\" \/><\/p><p class=\"image-description\">Write in the numbers corresponding to Cloudflare\u2019s DNS address<\/p><p>If you want to use Google\u2019s public DNS, type in the following values:<\/p><p><strong>8.8.8.8<\/strong> for <strong>Preferred DNS server<\/strong><\/p><p><strong>8.8.4.4<\/strong> for <strong>Alternate DNS server<\/strong><\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-748\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-DNS-server-address-to-google.jpg\" alt=\"\" width=\"388\" height=\"444\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-DNS-server-address-to-google.jpg 388w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/change-DNS-server-address-to-google-262x300.jpg 262w\" sizes=\"(max-width: 388px) 100vw, 388px\" \/><\/p><p class=\"image-description\">Write in the numbers corresponding to Google\u2019s DNS address<\/p><ol start=\"7\"><li>Click on <strong>OK.<\/strong><\/li><\/ol><ol start=\"8\"><li><strong> Restart <\/strong>your browser, i.e. close it and open it again.<\/li><\/ol><ol start=\"9\"><li>Try <strong>loading the website again<\/strong>. If the issue was DNS address, you should now be able to access the website.<\/li><\/ol><h4>Changing Your DNS Address in <strong>Mac<\/strong>:<\/h4><ol><li>Go to <strong>System Preferences &gt; Network &gt; Advanced<\/strong>.<\/li><\/ol><ol start=\"2\"><li>Select the <strong>DNS<\/strong> tab from the top row of the window.<\/li><\/ol><ol start=\"3\"><li>Click in the text box on the window on the left side, titled <strong>DNS Servers<\/strong>.<\/li><\/ol><ol start=\"4\"><li><strong> Write the corresponding values <\/strong>for the new DNS address in the text box.<\/li><\/ol><p>If you want to use Cloudflare\u2019s public DNS, type in the following numbers:<\/p><p><strong>1.1.1.1 <\/strong>in the first line;<\/p><p><strong>1.0.0.1<\/strong> in the second line.<\/p><p>If you want to use Google\u2019s public DNS, type in the following number:<\/p><p><strong>8.8.8.8<\/strong> in the first line;<\/p><p><strong>8.8.4.4<\/strong> in the second line.<\/p><ol start=\"5\"><li>Click <strong>OK.<\/strong><\/li><\/ol><ol start=\"6\"><li><strong> Restart <\/strong>your browser, i.e. close it and open it again.<\/li><\/ol><ol start=\"7\"><li><strong> Try loading the website again.<\/strong> Hopefully, the issue has been resolved!<\/li><\/ol><h3 id=\"temporarily-disable-your-firewall-cdn-and-proxy\" class=\"c-anchor\">7. Temporarily Disable Your Firewall, CDN, and Proxy<\/h3><p>The 502 bad gateway error could be caused by your firewall, CDN (content delivery network) or proxy. To check if one of them is the culprit, simply disable each of them, one by one, temporarily. After disabling each, reload the page and see if it worked.<\/p><p>If you\u2019re using a CDN plugin, like this free <a href=\"https:\/\/wordpress.org\/plugins\/cdn-enabler\/\">CDN Enabler<\/a> plugin, deactivate it from your WordPress admin dashboard and then try loading your website again. If you can\u2019t access your WordPress admin dashboard, check out the next step on how to disable plugins via FTP client.<\/p><p>If you\u2019re using a proxy like <a href=\"https:\/\/www.cloudflare.com\/\">Cloudflare<\/a>, and you think that it\u2019s causing the issue, unfortunately you won\u2019t be able to disable it. All you can do is contact them about the error code and wait for them to fix it.<\/p><h3 id=\"deactivate-plugins-and-themes\" class=\"c-anchor\">8. Deactivate Plugins and Themes<\/h3><p>Up to this point, we\u2019ve been going over fixes for the 502 bad gateway error if the website is only down for you. From this point on, we\u2019ll be looking at what you can do to fix the error if it\u2019s causing the website to be down for everyone.<\/p><p>The first thing you can try is temporarily deactivating your WordPress themes and plugins, to see if one of them is causing the issue. Since many WordPress plugins and themes are made by independent web developers from around the world, there\u2019s no making sure that they\u2019re are bug-free or even regularly updated.<\/p><p><strong>Misconfigured plugins can cause the 502 bad gateway error<\/strong>. This can especially happen with caching plugins, if they keep outdated information, which may cause your website to malfunction.<\/p><h4>How to Disable Plugins from the WordPress Admin Dashboard<\/h4><p>If you can access your WordPress admin dashboard, disabling plugins is quite simple.<\/p><ol><li>Select the <strong>Plugins<\/strong> tab from the options on the left side of the screen.<\/li><\/ol><ol start=\"2\"><li>From the <strong>Bulk Actions<\/strong> menu, click on <strong>Deactivate<\/strong>. This will deactivate all your plugins.<\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-769\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-plugins-from-wordpress.jpg\" alt=\"\" width=\"582\" height=\"396\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-plugins-from-wordpress.jpg 582w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-plugins-from-wordpress-300x204.jpg 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/p><p class=\"image-description\">Deactivate all plugins from the <strong>Bulk Actions<\/strong> menu<\/p><ol start=\"3\"><li>Now, <strong>reload <\/strong>your WordPress website and see if that worked.<\/li><\/ol><ol start=\"4\"><li>If your website loads properly, it means that one of the plugins was causing the 502 bad gateway error. Begin <strong>reactivating <\/strong>the plugins one by one. <strong>Reload<\/strong> the page after each activation. When the website shows the 502 error again, you\u2019ll know which plugin was causing the issue. Now, you can deactivate it permanently, and contact the developer about the problem.<\/li><\/ol><h4>How to Disable Plugins if the WordPress Admin Dashboard Isn\u2019t Working<\/h4><p>In some cases, you may be seeing the bad gateway error even on your WordPress dashboard. Not to worry! You can also disable WordPress plugins via FTP client.<\/p><ol><li>Connect to your website via <strong>FTP <\/strong>client.<\/li><\/ol><ol start=\"2\"><li>Go to <strong>WordPress installation directory<\/strong>.<\/li><\/ol><ol start=\"3\"><li>Locate the <strong>wp_content\/plugins <\/strong>folder.<\/li><\/ol><ol start=\"4\"><li><strong> Change the name<\/strong> of the plugins folder to <strong>plugins_old<\/strong>. Renaming the folder will deactivate all plugins from your WordPress website.<\/li><\/ol><ol start=\"5\"><li>Try <strong>loading <\/strong>the website again, as well as your admin dashboard. If they load properly, you know that one of the plugins is in fact causing the 502 bad gateway error.<\/li><\/ol><ol start=\"6\"><li><strong> Go back<\/strong> to FTP and change the name of the plugins folder back to <strong>plugins<\/strong>. This will reactivate all plugins.<\/li><\/ol><ol start=\"7\"><li><strong>Test each plugin one by one. <\/strong>To find out which particular plugin was causing the issue, rename each plugin one by one to deactivate them. Try reloading the website after each deactivation. When the page loads, you\u2019ll have found the guilty plugin.<\/li><\/ol><h4>How to Disable Themes from the WordPress Admin Dashboard<\/h4><p>Just like plugins, themes are also created by independent web developers. A faulty theme code or an incompatibility between a theme and a plugin can cause the 502 bad gateway error.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-770\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-themes-to-fix-502-error.jpg\" alt=\"\" width=\"1018\" height=\"590\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-themes-to-fix-502-error.jpg 1018w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-themes-to-fix-502-error-300x174.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/deactivate-themes-to-fix-502-error-768x445.jpg 768w\" sizes=\"(max-width: 1018px) 100vw, 1018px\" \/><\/p><p class=\"image-description\">A faulty theme may be causing the 502 bad gateway error<\/p><p>In order to check if a theme is causing the problem, you\u2019ll need to temporarily deactivate your custom themes and revert back to a WordPress default theme, like <strong>Twenty Nineteen <\/strong>or <strong>Twenty Twenty.<\/strong><\/p><ol><li>Go to <strong>Appearance &gt; Themes<\/strong>. Activate the default WordPress theme. (You can also just <strong>deactivate <\/strong>your custom theme, and WordPress will automatically revert back to the default theme.)<\/li><\/ol><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-767\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/activate-default-theme.jpg\" alt=\"\" width=\"582\" height=\"606\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/activate-default-theme.jpg 582w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/02\/activate-default-theme-288x300.jpg 288w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/p><p class=\"image-description\">Go to <strong>Themes<\/strong> to revert back to the default WordPress theme<\/p><ol start=\"2\"><li><strong> Reload the page.<\/strong> Try loading the website again to see if reverting back to the default theme fixed the problem.<\/li><\/ol><h4>How to Disable Themes if the WordPress Admin Dashboard Isn\u2019t Working<\/h4><p>We\u2019ll do the same for themes that we did for plugins &#8211; disable custom themes via FTP client.<\/p><ol><li>Connect to server via <strong>FTP client.<\/strong><\/li><\/ol><ol start=\"2\"><li>Locate the <strong>wp_content\/themes<\/strong> folder.<\/li><\/ol><ol start=\"3\"><li>Change the name to <strong>themes_old<\/strong>.<\/li><\/ol><ol start=\"4\"><li>WordPress will <strong>automatically revert back<\/strong> to the default theme.<\/li><\/ol><ol start=\"5\"><li><strong> Try loading the page again.<\/strong> If the page loads successfully, a faulty custom theme was causing the 502 bad gateway error.<\/li><\/ol><p>What you can do &#8211; if you\u2019ve discovered that a theme is misconfigured &#8211; is contact the theme\u2019s developer so that they can work on fixing it.<\/p><h3 id=\"contact-your-host\" class=\"c-anchor\">9. Contact Your Host<\/h3><p>So far, we covered how you can fix the problem if it\u2019s:<\/p><ul><li>Isolated to your browser<\/li><li>Related to your WordPress settings<\/li><\/ul><p>However, the 502 error most commonly appears due to an issue with your web host\u2019s server. In this case, there\u2019s nothing you can do to fix it. But what you can and should do, is contact your hosting provider.<\/p><p>One way in which the server may be responsible for the error is that if a request takes too long to process, it\u2019s automatically canceled by the server via \u201ckill script.\u201d This is a measure to prevent long loading processes from affecting other users.<\/p><p>The other thing that may be behind the 502 bad gateway error is if your server is down. In addition to contacting your host, you can also open a support ticket on WordPress and see if the issue has to do with their servers.<\/p><h2>Final Words<\/h2><p>Hopefully, our guide was helpful for you to resolve the 502 bad gateway issue. The various solutions we went over should &#8211; at the very least &#8211; help you get to the root of the problem.<\/p><p>The first thing you can try is to see if the error stems from your PC\u2019s browser.<\/p><p>The next step to resolving the issue, if your WordPress website is down for everyone, is to adjust some WordPress settings (plugins and themes) to get the website up and running again.<\/p><p>The last step is contacting your web host. They\u2019re there to help! Once you\u2019ve notified them about the issue, your website should be up and running again soon.<\/p><p>Try the free <a href=\"https:\/\/html-cleaner.com\/css\/\" target=\"_blank\" rel=\"noopener\">CSS tidy up<\/a> which lets you beautify stylesheets for your websites.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-02d9db7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"02d9db7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e3db840\" data-id=\"e3db840\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-60a6169 article-end elementor-widget elementor-widget-spacer\" data-id=\"60a6169\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-565995e elementor-widget elementor-widget-heading\" data-id=\"565995e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">View Related Articles<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21bb133 elementor-widget elementor-widget-spacer\" data-id=\"21bb133\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-404e6d4 elementor-posts__hover-none elementor-grid-3 elementor-grid-tablet-2 elementor-grid-mobile-1 elementor-posts--thumbnail-top elementor-card-shadow-yes elementor-widget elementor-widget-posts\" data-id=\"404e6d4\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;cards_masonry&quot;:&quot;yes&quot;,&quot;cards_columns&quot;:&quot;3&quot;,&quot;cards_columns_tablet&quot;:&quot;2&quot;,&quot;cards_columns_mobile&quot;:&quot;1&quot;,&quot;cards_row_gap&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:35,&quot;sizes&quot;:[]}}\" data-widget_type=\"posts.cards\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-posts-container elementor-posts elementor-posts--skin-cards elementor-grid\">\n\t\t\t\t<article class=\"elementor-post elementor-grid-item post-2545 post type-post status-publish format-standard has-post-thumbnail hentry category-fixing-errors\">\n\t\t\t<div class=\"elementor-post__card\">\n\t\t\t\t<a class=\"elementor-post__thumbnail__link\" href=\"https:\/\/www.domainnamesanity.com\/blog\/why-are-my-emails-going-to-spam\/\" >\n\t\t\t<div class=\"elementor-post__thumbnail\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"640\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-1024x1024.jpg\" class=\"attachment-large size-large wp-image-2546\" alt=\"\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-1024x1024.jpg 1024w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-300x300.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-150x150.jpg 150w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-768x768.jpg 768w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-1536x1536.jpg 1536w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/spam-email-2048x2048.jpg 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/div>\n\t\t<\/a>\n\t\t\t\t<div class=\"elementor-post__text\">\n\t\t\t\t<h6 class=\"elementor-post__title\">\n\t\t\t<a href=\"https:\/\/www.domainnamesanity.com\/blog\/why-are-my-emails-going-to-spam\/\" >\n\t\t\t\tWhy Are My Emails Going to Spam?\t\t\t<\/a>\n\t\t<\/h6>\n\t\t\t\t<div class=\"elementor-post__excerpt\">\n\t\t\t<p>There is no experience more frustrating than having your emails end up in the spam folder of your recipients rather than their inboxes. If you\u2019ve found that your emails are going to spam instead of your subscribers\u2019 inboxes, keep reading to find out why.<\/p>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/article>\n\t\t\t\t<article class=\"elementor-post elementor-grid-item post-2525 post type-post status-publish format-standard has-post-thumbnail hentry category-fixing-errors\">\n\t\t\t<div class=\"elementor-post__card\">\n\t\t\t\t<a class=\"elementor-post__thumbnail__link\" href=\"https:\/\/www.domainnamesanity.com\/blog\/how-to-become-tech-savvy\/\" >\n\t\t\t<div class=\"elementor-post__thumbnail\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"518\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/tech-savvy-person-1024x828.jpg\" class=\"attachment-large size-large wp-image-2523\" alt=\"\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/tech-savvy-person-1024x828.jpg 1024w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/tech-savvy-person-300x243.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/tech-savvy-person-768x621.jpg 768w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/tech-savvy-person-1536x1243.jpg 1536w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2023\/07\/tech-savvy-person-2048x1657.jpg 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/div>\n\t\t<\/a>\n\t\t\t\t<div class=\"elementor-post__text\">\n\t\t\t\t<h6 class=\"elementor-post__title\">\n\t\t\t<a href=\"https:\/\/www.domainnamesanity.com\/blog\/how-to-become-tech-savvy\/\" >\n\t\t\t\tHow to Become Tech Savvy\t\t\t<\/a>\n\t\t<\/h6>\n\t\t\t\t<div class=\"elementor-post__excerpt\">\n\t\t\t<p>In a world where technology shapes our society and everyday life, knowing how to operate a computer and other common tech gadgets becomes a survival skill. <\/p>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/article>\n\t\t\t\t<article class=\"elementor-post elementor-grid-item post-2412 post type-post status-publish format-standard has-post-thumbnail hentry category-fixing-errors\">\n\t\t\t<div class=\"elementor-post__card\">\n\t\t\t\t<a class=\"elementor-post__thumbnail__link\" href=\"https:\/\/www.domainnamesanity.com\/blog\/what-two-protocols-are-used-to-deliver-mail-messages\/\" >\n\t\t\t<div class=\"elementor-post__thumbnail\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/07\/catch-all-email-1024x768.jpg\" class=\"attachment-large size-large wp-image-1827\" alt=\"\" srcset=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/07\/catch-all-email-1024x768.jpg 1024w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/07\/catch-all-email-300x225.jpg 300w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/07\/catch-all-email-768x576.jpg 768w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/07\/catch-all-email-1536x1152.jpg 1536w, https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/07\/catch-all-email-2048x1536.jpg 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/div>\n\t\t<\/a>\n\t\t\t\t<div class=\"elementor-post__text\">\n\t\t\t\t<h6 class=\"elementor-post__title\">\n\t\t\t<a href=\"https:\/\/www.domainnamesanity.com\/blog\/what-two-protocols-are-used-to-deliver-mail-messages\/\" >\n\t\t\t\tWhat two protocols are used to deliver mail messages?\t\t\t<\/a>\n\t\t<\/h6>\n\t\t\t\t<div class=\"elementor-post__excerpt\">\n\t\t\t<p>Emailing today is such an easy task. Compose, hit send, and your message travels across oceans and borders to reach its recipient. It is such an easy task that people\u2019s attention starts to drown in their full inboxes, which are also littered by spammers, phishers and other members of the not-so-nice population of netizens.<\/p>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/article>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0b4fddc elementor-widget elementor-widget-spacer\" data-id=\"0b4fddc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>There\u2019s no shortage of errors you\u2019ll experience on WordPress \u2013 but that\u2019s not us saying it\u2019s no good \u2013 it\u2019s great, in fact. The thing is, errors and using the Internet pretty much come hand in hand. The 502 Bad Gateway error is not limited to WordPress \u2013 it can happen on just&#8230;<\/p>\n","protected":false},"author":2,"featured_media":637,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-764","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fixing-errors"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site - Domain Name Sanity Blog<\/title>\n<meta name=\"description\" content=\"Learn what image optimization is and get some tips on how to optimize the images on your website for better performance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site - Domain Name Sanity Blog\" \/>\n<meta property=\"og:description\" content=\"Learn what image optimization is and get some tips on how to optimize the images on your website for better performance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/\" \/>\n<meta property=\"og:site_name\" content=\"Domain Name Sanity Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-03T06:48:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-06T06:32:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Douglas Moore\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Douglas Moore\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/\"},\"author\":{\"name\":\"Douglas Moore\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/#\\\/schema\\\/person\\\/da394e5c6329f3cff53724f73fb22a7b\"},\"headline\":\"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site\",\"datePublished\":\"2020-02-03T06:48:10+00:00\",\"dateModified\":\"2020-04-06T06:32:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/\"},\"wordCount\":4063,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/fix-502-bad-gateway-error.png\",\"articleSection\":[\"Fixing Errors\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/\",\"url\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/\",\"name\":\"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site - Domain Name Sanity Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/fix-502-bad-gateway-error.png\",\"datePublished\":\"2020-02-03T06:48:10+00:00\",\"dateModified\":\"2020-04-06T06:32:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/#\\\/schema\\\/person\\\/da394e5c6329f3cff53724f73fb22a7b\"},\"description\":\"Learn what image optimization is and get some tips on how to optimize the images on your website for better performance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/fix-502-bad-gateway-error.png\",\"contentUrl\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/fix-502-bad-gateway-error.png\",\"width\":900,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/\",\"name\":\"Domain Name Sanity Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/#\\\/schema\\\/person\\\/da394e5c6329f3cff53724f73fb22a7b\",\"name\":\"Douglas Moore\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/douglas-m-150x150.jpg\",\"url\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/douglas-m-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/www.domainnamesanity.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/douglas-m-150x150.jpg\",\"caption\":\"Douglas Moore\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site - Domain Name Sanity Blog","description":"Learn what image optimization is and get some tips on how to optimize the images on your website for better performance.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/","og_locale":"en_US","og_type":"article","og_title":"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site - Domain Name Sanity Blog","og_description":"Learn what image optimization is and get some tips on how to optimize the images on your website for better performance.","og_url":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/","og_site_name":"Domain Name Sanity Blog","article_published_time":"2020-02-03T06:48:10+00:00","article_modified_time":"2020-04-06T06:32:51+00:00","og_image":[{"width":900,"height":675,"url":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png","type":"image\/png"}],"author":"Douglas Moore","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Douglas Moore","Est. reading time":"20 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#article","isPartOf":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/"},"author":{"name":"Douglas Moore","@id":"https:\/\/www.domainnamesanity.com\/blog\/#\/schema\/person\/da394e5c6329f3cff53724f73fb22a7b"},"headline":"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site","datePublished":"2020-02-03T06:48:10+00:00","dateModified":"2020-04-06T06:32:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/"},"wordCount":4063,"commentCount":0,"image":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#primaryimage"},"thumbnailUrl":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png","articleSection":["Fixing Errors"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/","url":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/","name":"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site - Domain Name Sanity Blog","isPartOf":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#primaryimage"},"image":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#primaryimage"},"thumbnailUrl":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png","datePublished":"2020-02-03T06:48:10+00:00","dateModified":"2020-04-06T06:32:51+00:00","author":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/#\/schema\/person\/da394e5c6329f3cff53724f73fb22a7b"},"description":"Learn what image optimization is and get some tips on how to optimize the images on your website for better performance.","breadcrumb":{"@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#primaryimage","url":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png","contentUrl":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2020\/01\/fix-502-bad-gateway-error.png","width":900,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/www.domainnamesanity.com\/blog\/how-to-fix-502-bad-gateway-error-on-your-wordpress-site\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.domainnamesanity.com\/blog\/"},{"@type":"ListItem","position":2,"name":"9 Ways to Fix 502 Bad Gateway Error on Your WordPress Site"}]},{"@type":"WebSite","@id":"https:\/\/www.domainnamesanity.com\/blog\/#website","url":"https:\/\/www.domainnamesanity.com\/blog\/","name":"Domain Name Sanity Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.domainnamesanity.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.domainnamesanity.com\/blog\/#\/schema\/person\/da394e5c6329f3cff53724f73fb22a7b","name":"Douglas Moore","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/douglas-m-150x150.jpg","url":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/douglas-m-150x150.jpg","contentUrl":"https:\/\/www.domainnamesanity.com\/blog\/wp-content\/uploads\/2019\/12\/douglas-m-150x150.jpg","caption":"Douglas Moore"}}]}},"_links":{"self":[{"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/posts\/764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/comments?post=764"}],"version-history":[{"count":6,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/posts\/764\/revisions"}],"predecessor-version":[{"id":1077,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/posts\/764\/revisions\/1077"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/media\/637"}],"wp:attachment":[{"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/media?parent=764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/categories?post=764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.domainnamesanity.com\/blog\/wp-json\/wp\/v2\/tags?post=764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}