wordpress修复插件_如何修复WordPress中的502 Bad Gateway错误

wordpress修复插件

Do you want to fix the 502 bad gateway error on your site? This error is quite annoying because it can be caused by a lot of different things. This means troubleshooting the 502 bad gateway error can take some time. In this article, we will show you how to easily fix the 502 bad gateway error in WordPress.

您要修复网站上的502错误网关错误吗? 此错误非常令人讨厌,因为它可能是由许多不同的原因引起的。 这意味着对502错误的网关错误进行故障排除可能需要一些时间。 在本文中,我们将向您展示如何轻松修复WordPress中的502错误网关错误。

How to fix the 502 bad gateway error in WordPress
什么是502错误网关错误? (What is a 502 Bad Gateway Error?)

A 502 bad gateway error is triggered when your WordPress hosting server gets an invalid response for the requested page.

当您的WordPress托管服务器收到对所请求页面的无效响应时,会触发502错误网关错误。

Bad gateway error is one of the common WordPress errors that you may encounter on your site. It can be caused by a number of reasons and depending on your server the error message may also differ in looks slightly.

错误的网关错误是您在网站上可能会遇到的常见WordPress错误之一。 原因可能有多种,根据服务器的不同,错误消息的外观可能也会略有不同。

502 bad gateway in browser

When you visit a website your browser sends a request to the hosting server. The hosting server then finds the page and sends it back to your browser with the status code.

当您访问网站时,浏览器会将请求发送到托管服务器。 然后,托管服务器会找到该页面,并将其与状态代码一起发送回您的浏览器。

Normally, you wouldn’t see this status code. However, in case of an error the status code is displayed with an error message. Examples of such errors include 404 not found, 503 service unavailable, 403 forbidden error, and more.

通常,您不会看到此状态代码。 但是,如果发生错误,则会显示状态代码并显示一条错误消息。 此类错误的示例包括404找不到503服务不可用403禁止错误等。

The most common reason for a 502 bad gateway error is when your request takes too long for the server to respond. This delay can be a temporary glitch caused by high traffic. It could also be a glitch caused by a poorly coded WordPress theme or plugin. Last but not least, it can also happen due to a server misconfiguration.

502错误网关错误的最常见原因是您的请求花费的时间太长,服务器无法响应。 此延迟可能是由高流量引起的暂时故障。 也可能是由于WordPress主题或插件编码错误导致的故障。 最后但并非最不重要的一点是,由于服务器配置错误,它也可能发生。

That being said, let’s take a look at how to easily fix the 502 bad gateway error in WordPress.

话虽如此,让我们看一下如何轻松修复WordPress中的502错误网关错误。

修复502 Bad Gateway错误 (Fixing the 502 Bad Gateway Error)

This error is usually caused when your server is unable to find the cause of the invalid response. This means that we will try different troubleshooting steps until we find the problem.

当您的服务器找不到无效响应的原因时,通常会导致此错误。 这意味着我们将尝试不同的故障排除步骤,直到找到问题。

Ready, let’s get started.

准备好了,让我们开始吧。

步骤1:重新载入您的网站 (Step 1: Reload Your Website)

Sometimes your server may take longer to respond due to increased traffic or low server resources. In that case, the problem may automatically disappear in a few minutes. You should try reloading the web page that you are viewing to see if this was the cause.

有时,由于流量增加或服务器资源不足,服务器可能需要更长的响应时间。 在这种情况下,问题可能会在几分钟后自动消失。 您应该尝试重新加载正在查看的网页,以查看是否是原因。

If this fixed your problem, then you do not need to read any further. However, if you see this error frequently, then you need to continue reading as there may be something else that needs fixing.

如果这解决了您的问题,则您无需进一步阅读。 但是,如果您经常看到此错误,则需要继续阅读,因为可能还有其他需要修复的问题。

步骤2:清除浏览器缓存 (Step 2: Clear Browser Cache)

Your browser may be showing you the error page from the cache. Even after the issue is fixed, you would see the 502 error because the browser is loading your website from cache.

您的浏览器可能正在从缓存中向您显示错误页面。 即使问题已解决,您仍会看到502错误,因为浏览器正在从缓存加载网站。

To fix this, users with Windows/Linux operating systems can press Ctrl + F5 buttons and Mac OS users can press CMD + Shift + R buttons on their keyboards to refresh the page. You can also remove the cache manually from your browser settings.

要解决此问题,使用Windows / Linux操作系统的用户可以按Ctrl + F5按钮,而Mac OS用户可以按键盘上的CMD + Shift + R按钮刷新页面。 您也可以从浏览器设置中手动删除缓存。

Clear browser cache

Once you clear your WordPress cache, try loading the website again.

清除WordPress缓存后 ,请尝试再次加载网站。

You can use a different browser to troubleshoot if the problem is occurring because of browser cache. If you see the error on all browsers, then continue reading.

如果由于浏览器缓存而出现问题,则可以使用其他浏览器进行故障排除。 如果在所有浏览器上都看到错误,请继续阅读。

步骤3:停用CDN或防火墙 (Step 3: Disable the CDN or Firewall)

If you are using a CDN service or website firewall on your website, then it is possible that their servers are acting up. To check this, you will need to temporarily disable CDN.

如果您在网站上使用CDN服务网站防火墙 ,则它们的服务器可能正在运行。 为此,您需要暂时禁用CDN。

Once disabled, it will remove the additional layer that has been created between your browser and the hosting server. Your website will now load entirely from your server and if the issue was caused by the CDN / firewall service, then it will get resolved now.

禁用后,它将删除在浏览器和托管服务器之间创建的附加层。 现在,您的网站将完全从服务器加载,如果问题是由CDN /防火墙服务引起的,则现在可以解决。

You can then contact your CDN service provider for support. Once the issue is resolved, you can go ahead and enable the CDN again.

然后,您可以联系CDN服务提供商以获取支持。 问题解决后,您可以继续并再次启用CDN。

步骤4:更新WordPress主题和插件 (Step 4: Update WordPress Themes and Plugins)

If the error is still there, then the next step is to check your theme or plugins.

如果错误仍然存​​在,则下一步是检查主题或插件。

First, you will need to deactivate all WordPress plugins via FTP. After that, visit your website to see if the error has resolved.

首先,您将需要通过FTP 停用所有WordPress插件 。 之后,请访问您的网站以查看错误是否已解决。

If it is, then one of your plugins was causing the issue. You now need to activate all plugins one by one until you can reproduce the error. This will help you locate the plugin responsible for the error.

如果是这样,则说明您的一个插件引起了该问题。 现在,您需要一个接一个地激活所有插件,直到可以重现该错误为止。 这将帮助您找到导致错误的插件。

You can find an alternative plugin or contact the plugin author for support.

您可以找到替代插件,或与插件作者联系以获取支持。

If deactivating plugins didn’t solve your issue, then you would want to check your WordPress theme. You will need to switch WordPress theme via phpMyAdmin.

如果停用插件不能解决您的问题,则您需要检查WordPress主题。 您将需要通过phpMyAdmin切换WordPress主题

After switching your theme to the default WordPress theme, visit your website to see if it’s working. If you are still seeing the error, then continue reading.

将主题切换为默认的WordPress主题后,请访问您的网站以查看其是否有效。 如果仍然看到错误,请继续阅读。

步骤5:检查托管服务器 (Step 5: Check the Hosting Server)

If all above-mentioned troubleshooting steps failed, then it is likely an issue with your hosting server.

如果上述所有故障排除步骤均失败,则主机服务器可能有问题。

You need to contact your hosting provider’s support team and let them know the issue. You can also mention all the troubleshooting steps you have taken.

您需要联系托管服务提供商的支持团队,并让他们知道问题。 您还可以提及已采取的所有故障排除步骤。

All good WordPress hosting companies will be able to quickly fix the issue if it is caused by a server misconfiguration.

如果这是由服务器配置错误引起的,那么所有好的WordPress托管公司都将能够Swift解决该问题。

That’s all. We hope this article helped you learn how to fix the 502 bad gateway error in WordPress. You may also want to see our complete WordPress troubleshooting guide for step by step instructions on fixing your WordPress issues.

就这样。 我们希望本文能帮助您学习如何修复WordPress中的502错误网关错误。 您可能还想查看我们完整的WordPress故障排除指南 ,以获取有关解决WordPress问题的分步说明。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-502-bad-gateway-error-in-wordpress/

wordpress修复插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值