wordpress后台白屏_如何修复WordPress死亡白屏(逐步操作)

wordpress后台白屏

The WordPress white screen of death is one of the most common WordPress errors. It is also one of the most frustrating ones because there is no error message, and you are locked out of WordPress.

WordPress白屏死机是最常见的WordPress错误之一 。 它也是最令人沮丧的消息之一,因为没有错误消息,并且您已被WordPress锁定。

Another problem with the white screen of death error is that sometimes it only affects a certain part of your website.

白屏死机错误的另一个问题是,有时它仅会影响您网站的特定部分。

For example, you may only see the white screen of death inside the WordPress admin area, while everything else works fine. In other cases, you may only see it on a specific post whereas everything else works fine.

例如,您可能只会在WordPress管理区域内看到白屏死机,而其他一切都正常。 在其他情况下,您可能只会在特定的帖子上看到它,而其他所有内容都可以正常工作。

In this article, we will show you how to fix the WordPress white screen of death by looking at different solutions.

在本文中,我们将向您展示如何通过查看不同的解决方案来修复WordPress白屏死机。

Fixing WordPress white screen of death error

Note: Before you make any changes to your site, make sure you have a backup of your WordPress site. If you don’t have access to the admin area, then see our guide on how to manually create WordPress database backup.

注意:在对网站进行任何更改之前,请确保已备份WordPress网站 。 如果您无权访问管理区域,请参阅有关如何手动创建WordPress数据库备份的指南

为什么您会在WordPress中看到死亡白屏? (Why Do You See the White Screen of Death in WordPress?)

Majority of the time when you see a white screen of death, it means that a script on your website exhausted the memory limit.

在大多数情况下,您看到白屏的死亡时,这意味着网站上的脚本用尽了内存限制。

The unresponsive script either gets killed by your WordPress hosting server, or it simply times out. This is why no actual error message is generated, and you see a plain white screen.

无响应的脚本要么被您的WordPress托管服务器杀死,要么只是超时。 这就是为什么没有实际的错误消息生成,并且您看到纯白色屏幕的原因。

WordPress showing white screen instead of website

This error can also happen due to a poorly coded theme or plugin installed on your site. Sometimes it can happen if there is an issue with your web hosting server.

由于您的网站上安装的主题或插件编码错误,也可能发生此错误。 如果您的网络托管服务器出现问题,有时可能会发生。

Since the white screen error can be caused by any number of things, it requires methodical troubleshooting to fix.

由于白屏错误可能是由多种原因引起的,因此需要系统地进行故障排除才能解决。

该问题是否在您的其他站点上发生? (Does the problem occur on your other sites?)

If you have other WordPress sites installed on the same hosting account, then you want to start by checking if the problem is occurring on other sites as well.

如果您在同一托管帐户上安装了其他WordPress网站,那么您首先要检查问题是否也在其他网站上发生。

If it is, then that’s a strong indicator that something is wrong with your WordPress hosting service. This could be a temporary issue affecting their service, and you need to reach out to their support for more help.

如果是这样,那么这就很有力地表明您的WordPress托管服务有问题。 这可能是暂时的问题,可能会影响他们的服务,因此您需要寻求他们的支持以寻求更多帮助。

On the other hand, if the issue is only happening with one website or a specific part of that site, then you know that the problem is with that particular website.

另一方面,如果问题仅发生在一个网站或该网站的特定部分,则说明问题出在该特定网站。

使用WordPress恢复模式修复白屏错误 (Fixing White Screen Error with WordPress Recovery Mode)

If the white screen of death error is caused by a WordPress plugin or theme, then WordPress may be able to catch it.

如果白屏死机错误是由WordPress插件或主题引起的,则WordPress可能能够捕获它。

The new fatal error protection feature introduced in WordPress 5.2 can sometimes catch the error, so you may not even see a white screen. Instead, you will see a message that the site is having technical difficulties.

WordPress 5.2中引入的新的致命错误保护功能有时可以捕获该错误,因此您甚至可能看不到白屏。 相反,您会看到一条消息,指出站点存在技术困难。

Technical difficulties

You would also receive an email message on your admin email address with the subject ‘Your Site is Having a Technical Issue’.

您还将在管理员电子邮件地址上收到一封电子邮件,主题为“您的网站存在技术问题”。

Technical issue email sent to admin

This email message will point out the plugin causing the error, and it will also contain a special link. This link will allow you to login to the WordPress recovery mode and deactivate the faulty plugin.

此电子邮件消息将指出导致该错误的插件,并且还将包含一个特殊链接。 该链接将允许您登录到WordPress恢复模式并停用有问题的插件。

WordPress recovery mode

However, if you are seeing the plain white screen of death with no email or recovery mode option, then you need to manually fix the error.

但是,如果看到死亡的纯白色屏幕,没有电子邮件或恢复模式选项,则需要手动修复错误。

增加内存限制 (Increasing the Memory Limit)

Usually, this error happens because a script has exhausted the memory and quit in the middle. To fix this, you need to increase PHP memory available to WordPress. This will allow the script to use more memory to finish the job it was supposed to do.

通常,发生此错误是因为脚本耗尽了内存并在中间退出。 要解决此问题,您需要增加可用于WordPressPHP内存。 这将允许脚本使用更多的内存来完成其应做的工作。

You can follow the instructions in our tutorial on how to increase PHP memory in WordPress.

您可以按照我们的教程中有关如何在WordPress中增加PHP内存的说明进行操作

禁用所有插件 (Disabling All Plugins)

If increasing the memory limit did not help, or if you have a high memory limit like 256M or 512M, then you need to start troubleshooting.

如果增加内存限制无济于事,或者如果内存限制较高,例如256M或512M,则需要开始故障排除。

In our experience of troubleshooting this issue, we have always found that the issue is either with a specific plugin or a theme. Let’s go ahead and disable all the plugins.

根据我们对该问题进行故障排除的经验,我们始终发现该问题与特定的插件或主题有关。 让我们继续禁用所有插件。

If you can still access the WordPress admin area, then you can simply go to Plugins » Installed Plugins page. Select all the installed plugins and then select ‘Deactivate’ under ‘Bulk Actions’ drop-down.

如果仍然可以访问WordPress管理区域,则只需转到“ 插件»已安装插件”页面。 选择所有已安装的插件,然后在“批量操作”下拉菜单中选择“停用”。

Deactivate all plugins via WordPress admin area

However, if you don’t have access to the WordPress admin area, then you will need to deactivate all plugins via FTP.

但是,如果您无权访问WordPress管理员区域,则需要通过FTP 停用所有插件

First, connect to your WordPress site using an FTP client. Once connected, go to the wp-content folder where you will see the ‘plugins’ folder.

首先, 使用FTP客户端连接到您的WordPress网站。 连接后,转到wp-content文件夹,您将在其中看到“插件”文件夹。

Rename plugins folder to deactivate all plugins

Now, you need to right-click on the plugins folder and then select rename. You can rename the plugins folder to plugins-deactivated.

现在,您需要右键单击plugins文件夹,然后选择“重命名”。 您可以将plugins文件夹重命名为plugins-deactivated。

Plugins deactivated

Your FTP client will now rename the plugins folder.

您的FTP客户端现在将重命名plugins文件夹。

WordPress looks for a folder named plugins to load all plugins. When it cannot find the folder, it simply deactivates all plugins.

WordPress寻找一个名为plugins的文件夹来加载所有插件。 当找不到文件夹时,它只是停用所有插件。

If this fixes the issue, then enable one plugin at a time to get to the bottom of the issue. Once you find the plugin causing the issue, you can replace it with an alternative or report the issue to plugin authors.

如果这样可以解决问题,则一次启用一个插件即可解决问题。 找到导致问题的插件后,您可以将其替换为备用插件,也可以将问题报告给插件作者。

用默认主题替换主题 (Replace Theme with a Default Theme)

If the plugin troubleshooting doesn’t fix the issue, then you should try replacing your current theme with a default theme.

如果插件故障排除不能解决问题,则应尝试将当前主题替换为默认主题。

First, connect to your website using an FTP client and go to the /wp-content/themes/ folder. It contains all installed themes on your website.

首先,使用FTP客户端连接到您的网站,然后转到/ wp-content / themes /文件夹。 它包含您网站上所有已安装的主题。

Right-click to select your current WordPress theme and download it to your computer as a backup.

右键单击以选择当前的WordPress主题,并将其下载到计算机作为备份。

Download current theme as backup

Next, you need to delete your current theme from your website. Right-click on your theme folder and select ‘Delete’. Your FTP client will now delete the theme from your website.

接下来,您需要从网站中删除当前主题。 右键单击您的主题文件夹,然后选择“删除”。 您的FTP客户端现在将从您的网站删除主题。

Delete current theme

Now if you have a default WordPress theme like (Twenty Eighteen or Twenty Nineteen) installed on your website, then WordPress will automatically start using it as the default theme.

现在,如果您在网站上安装了默认的WordPress主题(例如(二十一岁或二十十九岁)),那么WordPress将自动开始将其用作默认主题。

However, if you don’t have a default theme installed, then you need to manually install it using FTP.

但是,如果您没有安装默认主题,则需要使用FTP手动安装它

If this fixes the issue, then you should look at your theme’s functions.php file. If there are extra spaces at the bottom of the file, then you need to remove those, and sometimes that fixes the issue.

如果这解决了问题,则应查看主题的functions.php文件。 如果文件底部有多余的空格,则需要删除这些空格,有时可以解决该问题。

If you are using a poorly coded function in your theme’s functions.php file, then it can cause the white screen of death error as well.

如果您在主题的functions.php文件中使用了编码不良的函数,那么它也可能导致白屏死亡错误。

Consider downloading a fresh copy of your theme from its source and then install it.

考虑从主题源下载主题的新副本,然后进行安装。

启用调试模式以捕获WordPress中的错误 (Enable Debug Mode to Catch Errors in WordPress)

If nothing has helped so far, then the next step is to turn on debugging in WordPress. This will allow you to see what type of errors are being outputted.

如果到目前为止没有任何帮助,那么下一步就是打开WordPress中的调试功能。 这将使您看到正在输出的错误类型。

Simply, add the following code into your wp-config.php file.

只需将以下代码添加到wp-config.php文件中


define( 'WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

Once you add this, the blank screen will now have errors, warnings, and notices. These may be able to help you determine the root cause.

添加后,黑屏将显示错误,警告和通知。 这些也许可以帮助您确定根本原因。

If you don’t see any errors, you may still want to check the debug log. Simply visit the wp-content folder on your website using an FTP client. There you will find a new debug.log file containing a log of all errors, notices, and warnings.

如果没有看到任何错误,则可能仍要检查调试日志。 只需使用FTP客户端访问您网站上的wp-content文件夹。 在这里,您会发现一个新的debug.log文件,其中包含所有错误,通知和警告的日志。

Debug log
清除WordPress缓存 (Clear WordPress Cache)

Sometimes, you may have access to the backend, but the front-end of the site has the white screen of death. This can happen because of a caching plugin. Simply empty your cache.

有时,您可能可以访问后端,但是站点的前端白屏死机。 这可能是由于缓存插件引起的 。 只需清空您的缓存。

See our guide on how to clear cache in WordPress for detailed instructions.

有关详细说明,请参阅有关如何清除WordPress中的缓存的指南。

修正较长的文章 (Fixing Longer Articles)

If you have a white screen of death only on a very long post or page, then this little trick might work.

如果只有很长的帖子或页面上只有白色的死亡屏,那么这个小窍门可能会起作用。

This trick basically increases PHP’s text processing capability by increasing the recursion and backtrack limit. You can paste the following code in your wp-config.php file.

通过增加递归和回溯限制,此技巧基本上可以提高PHP的文本处理能力。 您可以将以下代码粘贴到wp-config.php文件中。


/** Trick for long posts */
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);

We understand that this is a very frustrating error, and we hope that one of the tricks above fixed the issue for you. You may also want to see our WordPress troubleshooting guide which teaches the steps you should take to catch and fix WordPress problems by yourself.

我们知道这是一个非常令人沮丧的错误,我们希望以上技巧之一可以为您解决该问题。 您可能还想查看我们的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-wordpress-white-screen-of-death/

wordpress后台白屏

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ERR_TOO_MANY_REDIRECTS错误是指在访问WordPress后台时出现的错误提示,表示重定向次数过多。这个错误通常是由于配置问题或者服务器设置引起的。解决这个问题的方法有几种。 一种方法是检查WordPress的设置。确保在WordPress的设置中,网站的URL和站点地址都正确设置为你的域名。还可以尝试禁用所有插件,然后逐个重新启用插件,以确定是哪个插件引起了重定向问题。 另一种方法是检查服务器的设置。首先,确保你的网站的域名已经正确指向服务器,并且服务器的配置文件中没有重定向规则。另外,还可以尝试删除服务器上的缓存文件或者重启服务器来清除任何可能引起重定向问题的缓存。 如果以上方法都没有解决问题,还可以尝试修改WordPress的配置文件。通过FTP或者文件管理器找到WordPress的根目录下的wp-config.php文件,添加以下代码: define('WP_HOME','http://yourdomain.com'); define('WP_SITEURL','http://yourdomain.com'); 将上面的代码中的"yourdomain.com"替换为你的域名。保存文件后,重新访问WordPress后台,看看是否问题已经解决。 总之,ERR_TOO_MANY_REDIRECTS错误可能是由于WordPress的配置问题或者服务器设置引起的。通过检查WordPress的设置、服务器的设置和修改WordPress的配置文件,你应该能够解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [解决安装wordpress时出现ERR_TOO_MANY_REDIRECTS重定向次数过多问题 原创</font>](https://download.csdn.net/download/weixin_38677648/12900397)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [Nginx + WordPress ERR_TOO_MANY_REDIRECTS](https://blog.csdn.net/cyan20115/article/details/106548984)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值