502 Bad Gateway Error?

Here’s what it means, and how to fix it!

bad gateway error

Common Causes of a 502 Bad Gateway Error:

🛠️ A slow or overloaded server  |  🔌 Plugin or theme conflicts   |  🧱 PHP errors or timeouts

🌐 DNS misconfiguration  |  ⚙️ Firewall or CDN blocking legitimate requests

 

🛠️ A slow or overloaded server
🔌 Plugin or theme conflicts
🧱 PHP errors or timeouts
🌐 DNS misconfiguration
⚙️ Firewall or CDN blocking legitimate requests

What is a 502 Bad Gateway Error?

In this guide, we will break down what the 502 Bad Gateway error means, explore common causes, and walk you through how to fix it. Whether you are tech-savvy or a complete novice, you should be able to follow these steps with no problem. Let’s dive in!

Breaking Down the Meaning

This error happens when one server receives an invalid response from another server. In WordPress, it normally means that your hosting server is trying to connect to another service, like PHP or a proxy, and something has gone wrong.

Instead of showing your website like normal, your browser instead displays the error message.

Common Causes That Block the Gateway

There are many different causes for receiving the 502 error on your website, and some of them aren’t always easy to figure out at first. The most common reasons that you would see this error are:

  • A slow or overloaded server
  • Plugin or theme conflicts
  • PHP errors and timeouts
  • DNS misconfiguration
  • Firewall or security feature blocking access

How to Fix It, Step by Step

Let’s go through some steps you can take to try to resolve this issue on your own. We’ll start with the easiest steps first.

Step 1: Refresh the page

It might sound so simple at first, and you might even laugh at the suggestion. Sometimes, though, this can be just a temporary glitch and go back to normal within as little as a couple of minutes. Your server might be rebooting, under maintenance, or trying to handle a sudden surge in traffic.

If the page loads again, great! If it doesn’t, then keep reading for more steps.

Step 2: Clear Your Cache & Cookies

Sometimes your browser is simply holding onto old data, which can cause it to display outdated content, or even errors like a 502 Bad Gateway. Clearing your cache gives your browser a fresh start and can often resolve the issue.

Here’s how to do it:

  1. Open your browser’s settings and look for the option to clear browsing data or history.
  2. Select a time range. We recommend choosing “All time” to ensure no leftover cached data causes problems.
  3. Make sure to check the boxes for:
    1. Cached images and files
    2. Cookies and site data

Note: Clearing this will log you out of most websites you stay signed into, since they rely on stored cookies to keep you logged in.

Not ready to clear everything?

No worries—you can also open your website in a private (incognito) window. This skips cached data entirely and gives you a clean version of the site. It’s a good, quick test if you’re not quite ready to wipe your browser history.

Either way, it’s a good habit to clear your cache every so often to avoid slow loading and weird glitches.

An image with a list showing where to go to clear your cache.

Step 3: Deactivate Your Plugins

An outdated, buggy, or poorly managed plugin can sometimes cause issues with your website. This is why we are proactive about managing and keeping your plugins updated. To do it yourself, follow these steps:

First, if you have access to your WordPress dashboard, then you will want to log in there through wp-admin. If you don’t know the address to log in, it is usually yourdomain.com/wp-admin. (With yourdomain.com being the name of your website). If you don’t know your password, WordPress has a handy place on this page where you can reset it via your email address.

Once you get logged into your WordPress dashboard, you will want to find the plugins. This is located in the left-hand sidebar and usually looks like a plug icon.

Next you will want to go to the All Plugins tab and deactivate your plugins. You can choose to do this one at a time and then try viewing your webpage if you want to try and pinpoint the issue and think it may be plugin related. For example, let’s say you just installed a new plugin and then your website stopped working. Just deactivate that plugin and then try viewing your website to see if it could be the issue.

Note: In the image above, some plugins are outdated. We recommend making sure that all of your plugins are up to date before following this step! If not, try updating them first and then viewing your website again.

If you have tried refreshing the page and checking your plugins, yet still see the 502 Bad Gateway Error message, read on for more troubleshooting steps.

Step 4: Try Changing Your Theme

An old theme or a theme with no updates can cause issues, just like a plugin can. You can try changing your theme to see if this resolves the problem. Before you change your theme completely, try checking to see if there are any updates for it first, or if you need to renew your license (if you have a paid theme).

In your WordPress dashboard, go to Appearance, then Themes.

Once you have gone to your themes, then you can select and activate a different theme, like the 2023 theme, then save the changes. Try refreshing your website again and going to your home page to see if changing the theme has fixed the problem.

Still seeing an error? No problem! Read on for more troubleshooting steps.

Step 5: Disable Your Firewall

It probably sounds crazy to tell you to disable a security feature that is supposed to protect your website, but it is a vital troubleshooting step to identifying the core issue causing the 502 error if all else has failed.

Sometimes, something like a firewall or CDN can get too aggressive and block traffic even when it’s not needed, including traffic from your own server.  Try logging into your dashboard and either pause or disable your security features, like your firewall. This could be something like Cloudflare or Sucuri.

Try refreshing your website now and loading your page to see if the error is gone. If it is gone, you might need to adjust the settings in your firewall or contact your support team for assistance. If you are still having a problem, continue reading for our last troubleshooting step.

Step 6: Review Your Server Resources & Logs

If you have tried everything and still see this 502 error, then the issue may be deeper within your server resources or error logs. This step is a little bit more advanced, but it could provide the insight you need to resolve recurring issues.

Here is what you can check:

Your server logs: Your hosting provider likely provides access to error logs through a control panel or dashboard. Look for any recent issues that may have occurred around the time you started seeing the 502 error message. These logs sometimes show PHP error logs, timeouts, and other server-side issues. If you don’t know precisely what you are looking at or what it means, you can always contact their support team for more insight.

Resource Usage: Some hosts do set limits on CPU, memory and processes, and the more you pay, the more allowance you get for larger limits. If your site is using too many resources, for example: during a traffic spike, it could trigger the 502 Bad Gateway message. Your hosting dashboard may show a graph or alerts about your server limits.

What to do if this is the issue:

If you see an issue here, you may need to consider upgrading your hosting plan. As websites grow, they tend to take more resources, which can max out the limits in your current plan. 

You can also try to optimize your site performance by reducing image sizes, removing unused themes and plugins, or using a caching tool to lighten the load on the server. For any videos, consider uploading them to a video-sharing service rather than storing them in your media library.

If you’re still seeing the 502 Bad Gateway Error after trying all the steps above, it might be time to call in the pros. Whether you’re unsure about what to do next or just want peace of mind, our expert web maintenance team at Hog the Web is here to help.

We’ll diagnose the issue, resolve it quickly, and get your site back online—so you can focus on running your business.

Contact us today and let us take care of the rest.

The Permanent Solution

Lets face it: You didn’t sign up to be your own IT department.
But here you are, googling error codes for a quick fix.

Smart website owners know the value of a dedicated WordPress support team. With Hog the Web, we fix your errors and keep your site running smoothly so you can focus on what you do best; grow your business!

Contact us today, and get your 502 Bad Gateway Error fixed FOR GOOD. 

YouTube video

Our WordPress experts pro-actively maintain and monitor your website, fixing urgent issues, handling updates, patching security vulnerabilities, and answering all your questions so you never have to Google another error message again.

Trusted by 150+ WordPress Site Owners.
We’ve been keeping websites alive and thriving since 2015.

5 Star Reviews

Google-logo
upwork-logo
fb-logo

Testimonials

"I can't say enough good things about the Hog the Web team. They're flexible, communicative, and they offer great ideas and advice."
Rachelyn Provencher

Marketing Director

"We've been working with Hog the Web for the past five years and it's been a really good experience for us."
Bruna Franco

Marketing Manager

"What I love about working with the Hog the Web team is the collaboration and creativity."
Megan Green

Marketing Manager

"We will be using Hog the Web for many many years to come, and we highly, highly recommend them for you as well."
Jennifer Robinson

Co-Owner

Website UpKeep Plans & Pricing

  • Monthly
  • Annually

WEBSITE SECURITY SERVICE

$59/mo

$649/year

Corporate-level website security plan for websites of all types. Includes WAF Firewall, Malware Scans and Removal, Vulnerability Scans and Patching, Site Acceleration Cache and more…

  • Anti-Hacker Firewall
  • Daily Malware Scans & Removal
  • Vulnerability Scans & Patching
  • CDN Site Acceleration – Server-Level Content Caching
  • Daily Cloud Backups & Quick Restore
  • INCLUDED: SSL/HTTPS Encryption Implementation

Get Started:

Sign Up Sign Up (One month free with yearly billing)

BASIC UPKEEP SERVICE

$79/mo

$869/year

The Basic UpKeep Service Plan is ideal for your WordPress website if you’re a startup or on a budget. It covers all the Basic Maintenance needs of your site including software and server updates, bug fixes, up-time monitoring, and access to our support team.

  • Unlimited Bug-Fixes
  • Pro-Active Site & Server Updates
  • 24/7 Uptime Monitoring
  • Daily Cloud Backups & Quick Restore
  • Customer Support via Phone, Email, & Chat
  • INCLUDED: SSL/HTTPS Encryption Implementation

Get Started:

Sign Up Sign Up (One month free with yearly billing)

PROFESSIONAL UPKEEP SERVICE


UPKEEP + SECURITY

$119/mo

$1309/year

For all established websites we recommend the Professional UpKeep Service Plan which includes all of the Basic UpKeep Service features PLUS the Bedrock Security Service Features. Never worry about your website again.

  • Anti-Hacker Firewall
  • Daily Malware Scans & Removal
  • Vulnerability Scans & Patching
  • Site Acceleration – Server-Level Content Caching
  • Unlimited Bug-Fixes
  • Pro-Active Site & Server Updates
  • 24/7 Uptime Monitoring
  • Daily Cloud Backups & Quick Restore
  • SSL/HTTPS Encryption Implementation
  • Customer Support via Phone, Email, & Chat

Get Started:

Sign Up Sign Up (One month free with yearly billing)

BUNDLE DEALS, AGENCY PRICING, & WHITE-LABEL PLANS

Contact Us for Pricing
  • To build your own service plan, contact us.
  • Ask us about bulk discounts for multiple websites
  • White-Label WordPress UpKeep Maintenance Plans
  • We also offer WordPress Optimized, and Managed Hosting Plans

Contact Us

Features Comparison Chart

Security Services

Bedrock Security

Maintenance Services

Basic UpKeep

Maintenance & Security

Pro UpKeep

Features
Get Started Get Started Get Started

Anti-Hacker Firewall (WAF)

Our cloud-based firewall detects and blocks any malicious traffic trying to reach your site, including DDoS attacks, Brute Force intrusions, and website malware. This keeps you safe from site infections, and site intrusions.

Anti-Hacker Firewall (WAF)

Daily Malware Scans & Removal

We scan your entire site and database daily for malware and virus infections. If any are found, we clean and remove them immediately and repair any damage they may have caused.

Daily Malware Scans & Removal

Vulnerability Scans & Patching

We scan your site software daily for vulnerabilities that can be exploited by malicious bots allowing intrusion. If any are found, they are patched immediately.

Vulnerability Scans & Patching

CDN Site Acceleration - Server-Level Content Caching

Our Content Delivery Network (CDN) accelerates the loading time of your website by compressing and pre-loading your web pages on distributed servers all around the country. Shorter distances equal faster loading times.

CDN Site Acceleration - Server-Level Content Caching

Daily Cloud Backups & Quick Restore

We take daily backups of your entire website and store them in the cloud (Amazon S3). If an unlikely catastrophe should occur that takes down your site, we can quickly restore it from any previous day to ensure minimal users are affected.

Daily Cloud Backups & Quick Restore

SSL/HTTPS Encryption Implementation

We install and renew an SSL certificate on your domain to ensure your user's data is encrypted from any eavesdroppers. Google gives a 15% boost in search rankings to sites that are encrypted!

SSL/HTTPS Encryption Implementation

Unlimited Bug-Fixes

If any bugs or glitches appear on your site affecting the display or functionality of your site, we fix them immediately so that your users are not affected. We routinely review and test your site manually for issues.

Unlimited Bug-Fixes

Pro-Active Site & Server Updates

Unlike most "Managed WordPress" hosting providers, we routinely install the new versions of your Plugins, Themes and WordPress software to fix glitches, add new features, and most importantly patch security vulnerabilities found in the code.

Pro-Active Site & Server Updates

24/7 Uptime Monitoring

We monitor your website 24/7 to ensure it's up and running. If your website goes down for any reason, we take action right away to get it back online.

24/7 Uptime Monitoring

Customer Support via Phone & Email

We provide you with a dedicated and responsive support team, who are always happy to answer your questions and solve any issues with your website.

Customer Support via Phone & Email
$59/month $649/year $79/month $869/year $119/month $1309/year
Stay Secured
Bedrock Security

Security Services

See what's included

Anti-Hacker Firewall (WAF)

Our cloud-based firewall detects and blocks any malicious traffic trying to reach your site, including DDoS attacks, Brute Force intrusions, and website malware. This keeps you safe from site infections, and site intrusions.

anti-hacker wordpress firewall Anti Hacker Firewall (WAF)

Daily Malware Scans & Removal

We scan your entire site and database daily for malware and virus infections. If any are found, we clean and remove them immediately and repair any damage they may have caused.

wordpress malware scans Daily Malware Scans & Removal

Vulnerability Scans & Patching

We scan your site software daily for vulnerabilities that can be exploited by malicious bots allowing intrusion. If any are found, they are patched immediately.

wordpress vulnerability scans Vulnerability Scans & Patching

CDN Site Acceleration – Server-Level Content Caching

Our Content Delivery Network (CDN) accelerates the loading time of your website by compressing and pre-loading your web pages on distributed servers all around the country. Shorter distances equal faster loading times.

wordpress site acceleration CDN Site Acceleration – Server-Level Content Caching

Daily Cloud Backups & Quick Restore

We take daily backups of your entire website and store them in the cloud (Amazon S3). If an unlikely catastrophe should occur that takes down your site, we can quickly restore it from any previous day to ensure minimal users are affected.

wordpress cloud backups Daily Cloud Backups & Quick Restore

SSL/HTTPS Encryption Implementation

We install and renew an SSL certificate on your domain to ensure your user’s data is encrypted from any eavesdroppers. Google gives a 15% boost in search rankings to sites that are encrypted!

wordpress ssl https encryption SSL/HTTPS Encryption Implementation

Customer Support via Phone & Email

We provide you with a dedicated and responsive support team, who are always happy to answer your questions and solve any issues with your website.

wordpress customer support Customer Support via Phone & Email

$59/month
$649/year
Most Popular
Basic Upkeep

Maintenance Services

See what's included

Unlimited Bug-Fixes

If any bugs or glitches appear on your site affecting the display or functionality of your site, we fix them immediately so that your users are not affected. We routinely review and test your site manually for issues.

wordpress bug fix service Unlimited Bug Fixes

Proactive site & server updates

Unlike most “Managed WordPress” hosting providers, we routinely install the new versions of your Plugins, Themes and WordPress software to fix glitches, add new features, and most importantly patch security vulnerabilities found in the code.

wordpress update service Proactive site & server updates

SSL/HTTPS Encryption Implementation

We install and renew an SSL certificate on your domain to ensure your user’s data is encrypted from any eavesdroppers. Google gives a 15% boost in search rankings to sites that are encrypted!

wordpress ssl https encryption service SSL/HTTPS Encryption Implementation

Daily Cloud Backups & Quick Restore

We take daily backups of your entire website and store them in the cloud (Amazon S3). If an unlikely catastrophe should occur that takes down your site, we can quickly restore it from any previous day to ensure minimal users are affected.

wordpress cloud backup service Daily Cloud Backups & Quick Restore

24/7 Uptime Monitoring

We monitor your website 24/7 to ensure it’s up and running. If your website goes down for any reason, we take action right away to get it back online.

wordpress site acceleration service 24/7 Uptime Monitoring

Customer Support via Phone & Email

We provide you with a dedicated and responsive support team, who are always happy to answer your questions and solve any issues with your website.

wordpress customer service Customer Support via Phone & Email

$79/month
$869/year
Most Beneficial
Pro Upkeep

Maintenance & Security

See what's included

Anti-Hacker Firewall (WAF)

Our cloud-based firewall detects and blocks any malicious traffic trying to reach your site, including DDoS attacks, Brute Force intrusions, and website malware. This keeps you safe from site infections, and site intrusions.

wordpress website firewall Anti Hacker Firewall (WAF)

Daily Malware Scans & Removal

We scan your entire site and database daily for malware and virus infections. If any are found, we clean and remove them immediately and repair any damage they may have caused.

wordpress malware scanning service Daily Malware Scans & Removal

Vulnerability Scans & Patching

We scan your site software daily for vulnerabilities that can be exploited by malicious bots allowing intrusion. If any are found, they are patched immediately.

wordpress vulnerability scan service Vulnerability Scans & Patching

CDN Site Acceleration – Server-Level Content Caching

Our Content Delivery Network (CDN) accelerates the loading time of your website by compressing and pre-loading your web pages on distributed servers all around the country. Shorter distances equal faster loading times.

wordpress site acceleration service CDN Site Acceleration – Server-Level Content Caching

Daily Cloud Backups & Quick Restore

We take daily backups of your entire website and store them in the cloud (Amazon S3). If an unlikely catastrophe should occur that takes down your site, we can quickly restore it from any previous day to ensure minimal users are affected.

wordpress daily cloud backups service Daily Cloud Backups & Quick Restore

SSL/HTTPS Encryption Implementation

We install and renew an SSL certificate on your domain to ensure your user’s data is encrypted from any eavesdroppers. Google gives a 15% boost in search rankings to sites that are encrypted!

wordpress ssl https encryption service SSL/HTTPS Encryption Implementation

Unlimited Bug-Fixes

If any bugs or glitches appear on your site affecting the display or functionality of your site, we fix them immediately so that your users are not affected. We routinely review and test your site manually for issues.

wordpress bug fix service Unlimited Bug Fixes

Proactive site & server updates

Unlike most “Managed WordPress” hosting providers, we routinely install the new versions of your Plugins, Themes and WordPress software to fix glitches, add new features, and most importantly patch security vulnerabilities found in the code.

wordpress site update service Proactive site & server updates

SSL/HTTPS Encryption Implementation

We install and renew an SSL certificate on your domain to ensure your user’s data is encrypted from any eavesdroppers. Google gives a 15% boost in search rankings to sites that are encrypted!

wordpress ssl https encryption service SSL/HTTPS Encryption Implementation

Daily Cloud Backups & Quick Restore

We take daily backups of your entire website and store them in the cloud (Amazon S3). If an unlikely catastrophe should occur that takes down your site, we can quickly restore it from any previous day to ensure minimal users are affected.

wordpress cloud backup service Daily Cloud Backups & Quick Restore

24/7 Uptime Monitoring

We monitor your website 24/7 to ensure it’s up and running. If your website goes down for any reason, we take action right away to get it back online.

wordpress 24/7 up time monitoring service 24/7 Uptime Monitoring

Customer Support via Phone & Email

We provide you with a dedicated and responsive support team, who are always happy to answer your questions and solve any issues with your website.

wordpress customer support service Customer Support via Phone & Email

$119/month
$1309/year
  • Monthly
  • Annually

Answers to Common Website Issues from Our Experts

Frequently Asked Questions

How quickly can you fix my issue?

For websites covered by our UpKeep services, our usual response time for urgent issues is one hour or less. In most cases we are able to resolve the issue in that time frame. 

If you aren’t yet signed up, then we will first need your web hosting login credentials to troubleshoot, so don’t hesitate, reach out to us now!

Can I hire you to just fix this one issue first?

Yes! We also offer our expert website maintenance and support services a-la-carte. In this case, we bill at our normal hourly rate. We would not exceed a pre-approved time limit/budget we set with you, and there is no minimum time so if an issue only takes 10 minutes to fix, then we only bill you for 10 minutes! 

Contact us to ask about our current hourly rates.

How do I fix a bad gateway error (502)?

A bad gateway error happens when a server upstream is acting up. It’s often temporary, but if it keeps happening, it could point to deeper issues with your web hosting provider or plugins causing server resource overages. We can diagnose and fix it fast, just reach out.

bad gateway error 502

What kind of customer support is included in your UpKeep services?

Beyond all the routine maintenance, testing, optimization and security work we handle behind the scenes we are also available to answer any questions you have about how to use your website; 

  • How do I edit the header nav?
  • How do I change the blog sidebar?
  • How can I integrate your newsletter sign up form?
  • How do I add a podcast to my site?
  • Is my site fast enough?
  • Can we improve my SEO?
  • Anything else you can think of!

Our team of WordPress experts is here for YOU, to help empower you to get the most out of your website!

Ready to Breathe Easy?

Whether you’re staring at a white screen of doom or just want to sleep better knowing your site’s protected, Hog the Web has your back.

Get in Touch

We’re here to help you with any questions you may have. Simply drop us an email message using the form below and we will respond you within 24 hours.

Levi-Meeunweberg (1)

Book a Free Consultation

Let’s talk about your next web project and how Hog the Web can plug into your team to deliver unrivaled results.

Pin It on Pinterest