{"id":5051,"date":"2019-07-17T10:05:55","date_gmt":"2019-07-17T10:05:55","guid":{"rendered":"https:\/\/wpvivid.com\/?p=5051"},"modified":"2019-07-17T10:05:55","modified_gmt":"2019-07-17T10:05:55","slug":"fix-502-bad-gateway-error-wordpress","status":"publish","type":"post","link":"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html","title":{"rendered":"How to Fix the 502 Bad Gateway Error in WordPress"},"content":{"rendered":"<p>I know it sucks, but here you are, so let me help you<a href=\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html\"> fix the 502 bad gateway error in your WordPress website<\/a>.<\/p>\n<p><a href=\"https:\/\/wpvivid.com\/fix-404-errors-in-wordpress.html\">Errors are annoying<\/a> not just to enthusiast website owners, but to even the experienced technical individuals.<\/p>\n<p>It leads to bad user experience and costs a lot in terms of time and potential revenue lost due to <a href=\"https:\/\/wpvivid.com\/choosing-a-wordpress-hosting.html\">server downtime<\/a>, yet the reality is that you can never<a href=\"https:\/\/wpvivid.com\/fix-500-internal-server-error-wordpress.html\"> avoid system glitches<\/a> and thus, errors entirely.<\/p>\n<p>The 502 bad gateway error is one common error not only to your website or<a href=\"https:\/\/wpvivid.com\/start-a-blog-with-wordpress.html\"> WordPress websites<\/a> at that, but even Google also experiences it every once in a blue moon. Hope that in a way comforts you.<\/p>\n<blockquote>\n<h2>What Causes the 502 Bad Gateway Error?<\/h2>\n<\/blockquote>\n<p>A 502 bad gateway error is an error that a browser displays when the<a href=\"https:\/\/wpvivid.com\/monitor-wordpress-memory-usage.html\"> server of a website<\/a> you are accessing fails to respond to a request.<\/p>\n<p>Since this is something that happens to any server out there, and since users visit websites from all sorts of browsers, it is possible to see a different variation for the error, here are typical errors that can be thrown;<\/p>\n<ul>\n<li>502 Bad Gateway<\/li>\n<li>Error 502<\/li>\n<li>HTTP 502<\/li>\n<li>That\u2019s an error<\/li>\n<li>502 Proxy Error<\/li>\n<li>502 Service Temporarily Overloaded<\/li>\n<li>A blank white screen<\/li>\n<li>Temporary Error (502)<\/li>\n<li>HTTP Error 502 \u2013 Bad Gateway<\/li>\n<li>502 Server Error: The server encountered a temporary error and could not complete your request<\/li>\n<li>Bad Gateway: The proxy server received an invalid response from an upstream server<\/li>\n<\/ul>\n<p>Whatever the error one sees, the browser is accessing the upstream server or the proxy server, but somehow their requests are not being fulfilled.<\/p>\n<p>Now that you know what it is, it will be easier to fix it. We shall explore a number of methods that should help you get your website running.<\/p>\n<blockquote>\n<h2>Different methods to fix the 502 Bad Gateway Error in WordPress<\/h2>\n<\/blockquote>\n<h4><strong>1. Reload\/refresh the website<\/strong><\/h4>\n<p>starting with the most natural thing you can do, anything can happen in the transmission of data between your browser and the server, a refresh may fix the error.<\/p>\n<h4><strong>2. Check your website on another browser or different location<\/strong><\/h4>\n<p>if a refresh does not work, switch browsers, and see if you get the same error. You can also try <a href=\"https:\/\/wpvivid.com\/setup-cloudflare-cdn-in-wordpress.html\">accessing the website from a different location<\/a>, the easiest way you can do that is using a proxy service \u2013 there are many of them online for free.<\/p>\n<p>If your website loads fine on another browser or location, then the issue is with your browser, step three should help with that. Else, it is time to get techy.<\/p>\n<h4><strong>3. Clear your browser cache\/cookies\/history<\/strong><\/h4>\n<p>If a website works fine in other places then chance is that your browser is serving you an older version of the website it saved, simply reset your cache, and you should be fine.<\/p>\n<p>If these basic, steps didn\u2019t fix the 502 bad gateway error, then it is time to dig into other underlying causes.<\/p>\n<h4><strong>4. Investigate the server and the DNS issues<\/strong><\/h4>\n<p>How do you know if it is the server? Again, start with a simple ping of the server \u00a0&#8211; several online tools help you with that, but, I will use an old school trick of pinging from your terminal.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"with-border alignnone wp-image-5052 size-full\" src=\"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/06\/ping-your-website-from-the-terminal.png\" alt=\"Ping your website from the terminal\" width=\"981\" height=\"292\" \/><\/p>\n<p>A ping of wpvivid.com shows that there is a 0% loss if yours shows the same results, then we know the server is appropriately functioning, move on and check<a href=\"https:\/\/wpvivid.com\/must-have-plugins-for-wordpress.html\"> your WordPress plugins<\/a> and <a href=\"https:\/\/wpvivid.com\/choose-perfect-wordpress-theme.html\">WordPress themes<\/a> \u2013 if there is a loss, then go to step 6 and <a href=\"https:\/\/wpvivid.com\/top-8-email-marketing-service-providers.html\">contact your host<\/a> if you are <a href=\"https:\/\/wpvivid.com\/choosing-a-wordpress-hosting.html\">using a managed hosting service.<\/a><\/p>\n<p>If you are <a href=\"https:\/\/wpvivid.com\/setup-cloudflare-cdn-in-wordpress.html\">using a CDN service like that of Cloudflare<\/a>, the IP address displayed will be that of Cloudflare, so you will need to <a href=\"https:\/\/wpvivid.com\/monitor-wordpress-memory-usage.html\">know the IP address<\/a> your host provided you when you created the account.<\/p>\n<p>Still, under checking your server, you will need to check if <a href=\"https:\/\/wpvivid.com\/clean-up-and-optimize-wordpress-database.html\">your databases are working<\/a>, typically you will get a <a href=\"https:\/\/wpvivid.com\/fix-error-establishing-a-database-connection.html\">no database connection error on WordPress<\/a>, but, the 502 error can also be caused by that.<\/p>\n<p><a href=\"https:\/\/wpvivid.com\/manage-multiple-wordpress-sites.html\">If you host multiple websites<\/a> on the same server, you can quickly also rule out the server issue by visiting the other sites if they work fine then the problem is isolated to your website. In that case, check your plugins and themes for potential problems.<\/p>\n<p>If, all your website is experiencing the same issue, then contact support.<\/p>\n<h4><strong>5. Check your plugins and themes<\/strong><\/h4>\n<p>A malfunctioning plugin or theme can be a likely cause of the 502 error. If you have tried all the above steps and they point to something to do with your WordPress files, then <a href=\"https:\/\/wpvivid.com\/how-to-edit-htaccess-file-and-insert-301-redirects.html\">access the files of your website<\/a>, either through <a href=\"https:\/\/wpvivid.com\/8-best-ftp-clients.html\">FTP client<\/a> or logging into the control panel.<\/p>\n<p>For cPanel, go to wp-content\/themes or wp-content\/plugins for plugins.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"with-border alignnone wp-image-5053 size-full\" src=\"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/06\/Check-your-plugins-and-themes-with-cPanel.png\" alt=\"Check your plugins and themes with cPanel\" width=\"908\" height=\"363\" \/><\/p>\n<p>Inside the plugins directory, for instance, right click and then rename each plugin.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"with-border alignnone wp-image-5054 size-full\" src=\"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/06\/rename-each-plugin-with-cpanel.png\" alt=\"Rename each plugin with cpanel\" width=\"738\" height=\"327\" \/><\/p>\n<p>If you have many plugins, you may find this tedious; what you can do is select all the plugins, compress them to one file and then delete all the plugins.<\/p>\n<p>Now check your website, if the error is gone, then we can conclude it is a troublesome plugin causing the 502 bad gateway error.<\/p>\n<p>Enable one plugin at a time as you reload your website until you land on the culprit. Unfortunately, there is no shortcut to this.<\/p>\n<p>This applies to the themes too.<\/p>\n<p><strong><b>Warning:<\/b><\/strong>\u00a0make sure you have <a href=\"https:\/\/wpvivid.com\/get-started-create-a-manual-backup.html\">saved a copy of your files<\/a>\u00a0somewhere before you do things that you will regret.<\/p>\n<h4><strong>6. Contact Support<\/strong><\/h4>\n<p>Since a 502 bad gateway error is likely to be an issue with the server, then this can quickly be resolved by contacting your <a href=\"https:\/\/wpvivid.com\/add-live-chat-support.html\">host\u2019s support center<\/a>.<\/p>\n<p>They are best positioned to fix any issues related to a misbehaving server or software running on it.<\/p>\n<p>Be sure to advise them on all you have done trying to troubleshoot the issue since they will most likely ask you to do those same tasks first.<\/p>\n<blockquote>\n<h2>Conclusion<\/h2>\n<\/blockquote>\n<p>For most website owners, a 502 bad gateway error is easily fixed by oneself, just follow the steps above, and you will do fine.<\/p>\n<p>In the worst case scenarios, your host\u2019s tech team can help you restore your server or <a href=\"https:\/\/wpvivid.com\/create-a-wordpress-staging-site.html\">move you to a different server<\/a>.<\/p>\n<p>When you think of worst-case scenarios, think backup \u2013 if you have been reading our articles, I may sound like a broken pipe on this, but, trust me everyone will need a back at one point in time, so save yourself the trouble and implement one today, actually, now.<\/p>\n<p>We have made it very easy with our <a href=\"https:\/\/wordpress.org\/plugins\/wpvivid-backuprestore\/\">WPvivid backup plugin<\/a> \u2013 it does everything for you on autopilot saving your files on the cloud with providers like Google Drive.<\/p>\n<p>You may also want to see our step by step guide about <a href=\"https:\/\/wpvivid.com\/fix-500-internal-server-error-wordpress.html\">how to fix the 500 internal server error in WordPress<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.<\/p>\n","protected":false},"author":3,"featured_media":5974,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","iawp_total_views":29},"categories":[80],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Fix the 502 Bad Gateway Error in WordPress - WPvivid<\/title>\n<meta name=\"description\" content=\"Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Fix the 502 Bad Gateway Error in WordPress - WPvivid\" \/>\n<meta property=\"og:description\" content=\"Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html\" \/>\n<meta property=\"og:site_name\" content=\"WPvivid\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-17T10:05:55+00:00\" \/>\n<meta name=\"author\" content=\"TonyRobins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TonyRobins\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html\",\"url\":\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html\",\"name\":\"How to Fix the 502 Bad Gateway Error in WordPress - WPvivid\",\"isPartOf\":{\"@id\":\"https:\/\/wpvivid.com\/#website\"},\"datePublished\":\"2019-07-17T10:05:55+00:00\",\"dateModified\":\"2019-07-17T10:05:55+00:00\",\"author\":{\"@id\":\"https:\/\/wpvivid.com\/#\/schema\/person\/7cd2b626d269c38ca5456654d1a5d2e0\"},\"description\":\"Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpvivid.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Fix the 502 Bad Gateway Error in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpvivid.com\/#website\",\"url\":\"https:\/\/wpvivid.com\/\",\"name\":\"WPvivid\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpvivid.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpvivid.com\/#\/schema\/person\/7cd2b626d269c38ca5456654d1a5d2e0\",\"name\":\"TonyRobins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpvivid.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/10\/logo1-96x96.png\",\"contentUrl\":\"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/10\/logo1-96x96.png\",\"caption\":\"TonyRobins\"},\"url\":\"https:\/\/wpvivid.com\/author\/tonyrobins\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Fix the 502 Bad Gateway Error in WordPress - WPvivid","description":"Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.","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:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html","og_locale":"en_US","og_type":"article","og_title":"How to Fix the 502 Bad Gateway Error in WordPress - WPvivid","og_description":"Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.","og_url":"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html","og_site_name":"WPvivid","article_published_time":"2019-07-17T10:05:55+00:00","author":"TonyRobins","twitter_card":"summary_large_image","twitter_misc":{"Written by":"TonyRobins","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html","url":"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html","name":"How to Fix the 502 Bad Gateway Error in WordPress - WPvivid","isPartOf":{"@id":"https:\/\/wpvivid.com\/#website"},"datePublished":"2019-07-17T10:05:55+00:00","dateModified":"2019-07-17T10:05:55+00:00","author":{"@id":"https:\/\/wpvivid.com\/#\/schema\/person\/7cd2b626d269c38ca5456654d1a5d2e0"},"description":"Get a 502 bad gateway error in your website? We will show you what is and how to fix the 502 bad gateway error in WordPress using different methods.","breadcrumb":{"@id":"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpvivid.com\/fix-502-bad-gateway-error-wordpress.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpvivid.com\/"},{"@type":"ListItem","position":2,"name":"How to Fix the 502 Bad Gateway Error in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/wpvivid.com\/#website","url":"https:\/\/wpvivid.com\/","name":"WPvivid","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpvivid.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpvivid.com\/#\/schema\/person\/7cd2b626d269c38ca5456654d1a5d2e0","name":"TonyRobins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpvivid.com\/#\/schema\/person\/image\/","url":"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/10\/logo1-96x96.png","contentUrl":"https:\/\/wpvivid.com\/wp-content\/uploads\/2019\/10\/logo1-96x96.png","caption":"TonyRobins"},"url":"https:\/\/wpvivid.com\/author\/tonyrobins"}]}},"_links":{"self":[{"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/posts\/5051"}],"collection":[{"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/comments?post=5051"}],"version-history":[{"count":0,"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/posts\/5051\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpvivid.com\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/media?parent=5051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/categories?post=5051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpvivid.com\/wp-json\/wp\/v2\/tags?post=5051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}