著名的 Wordpress 白屏死机 [英] The famous Wordpress white screen of death

查看:28
本文介绍了著名的 Wordpress 白屏死机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像标题中提到的,我认为这是 Automattic 或 Wordpress 团队目前无法解决的一个问题,除非 Wordpress 将来会采用什么版本.在这个问题中,我关注的是每当我想激活某些插件时都会出现的死亡白屏.我正在开发一个需要我使用 30 个插件的网站.是的,有人会说网站插件太多了,难怪我会得到白屏.但是,嘿,这是 Wordpress,使 Wordpress 成为最受欢迎的博客平台的原因之一是因为插件的可用性可以让您在更短的时间内实现目标.对于那些在 php+wp 开发方面的专家,你们可以说 hack wp 比使用我正在做的很多插件要好,但是嘿,大多数 wp 用户不是 php 大师.他们中的大多数都是像我这样的普通用户,甚至只知道如何安装和使用他们可用的东西.

Like mentioned in the title, i think this is by far one problem Automattic or Wordpress team cannot solve until no matter what version Wordpress will go in future. In this question, i am focusing to the white screen of death that i get whenever i want to activate certain plugins. I am developing a site that requires me to use 30 plugins. Yeah, some will say thats too many plugins for a site, no wonder i will get the white screen. But hey, this is Wordpress, one of the reason that makes Wordpress the most popular blogging platform is because the availability of the plugins that can make you achieve your goal in less time. For those who expert in php+wp development, you guys can say hack the wp is better than using a lot of plugins like what i am doing but hey, majority of wp users are not php guru. Most of them are normal user like me or even just know how to install and use what are available to them.

到目前为止,这是我们在获得白屏死机 (WSOD) 时执行的常见步骤.

So far, here the common steps we do when get the white screen of death (WSOD).

  1. 重命名wp-content/plugins文件夹名称,例如wp-content/plugins-temp,这将停用所有插件
  2. 像我一样,我更喜欢将单个插件文件夹的名称重命名,例如 wp-content/plugins/akismetwp-content/plugins/akismet-temp
  3. 之后,将所有插件一一重新激活,这样我们就可以知道哪个插件是罪魁祸首
  4. 检查插件文件末尾是否有多余的空白空间,尤其是在 php 结束标记之后?> 确保标记之后没有多余的空间.确保检查主题 functions.php 文件(如果有)或插件文件.
  5. 增加 wordpress 的内存分配
  1. Rename the wp-content/plugins folder name such as wp-content/plugins-temp, this will deactivate all plugins
  2. Like me, i prefer rename the individual plugin folder name, such as wp-content/plugins/akismet to wp-content/plugins/akismet-temp
  3. After that, reactivate all the plugins one by one, so we can know which plugin is the culprit
  4. Check for extra empty space at the end of the plugin file, especially after the php closing tag ?> make sure there is no extra space after the tag. Make sure check at the theme functions.php file (if any) or the plugin file.
  5. Increase the memory allocation for wordpress

通常,您的网站在那之后会恢复正常.但是这仍然不能解决这个问题.

Usually, your site will be back to normal after that. BUT this will still not solve this problem.

对我来说,这对我来说很烦人,尤其是第 3 步.我们怎么知道哪个插件是罪魁祸首??首先,我认为第 3 步确实是事实,但现在我认为它是谎言.为什么?

For me, this is very annoying to me, especially the step number 3. How can we know which plugin is the culprit?? At the first place, i thought the step number 3 is really a fact but now i think its a lie. WHY?

就像现在,突然在我激活 25 个插件后,我无法重新激活的插件之一是 Akismet.什么?阿基米特?是的,WP 团队自己开发的插件.我知道上面的第 3 步是谎言,因为如果我先激活 Akismet,Akismet 就会成功激活.完全没问题.

Like right now, suddenly after i activate 25 plugins, one of plugin that i cannot reactivate is Akismet. What? Akismet? Yes, the plugin dev by the WP team itself. I know the step number 3 above is a lie because if i activate Akismet first, the Akismet is activated successfully. No problem at all.

所以现在的问题是插件之间的插件兼容性.作为普通用户的我怎么能辨别哪个插件对哪个插件不友好???如果我使用 30 个插件,一个插件有多少概率与每个插件不兼容????我怎么知道应该先激活哪些插件才能不出现WSOD?

So right now the problem is plugins compatibility among the plugins. How can me as a normal user can identify which plugin that is not friendly to what plugin??? If i am using 30 plugins, how many probabilities from one plugin is not compatible to each plugin???? how can i know which plugins should be activated first so the WSOD will not appear?

如果有错误,那么也许我可以找到线索,但它是一个纯白色的屏幕.我一窍不通.wordpress 中插件的这种冲突真的是一个未解决的问题,让我感到压力很大.

If there is error, then maybe i can have a clue, but its a plain white screen. I am clueless. This clash of plugins in wordpress is really an unsolved problem that makes me really stress.

有人知道如何解决这个问题吗?至少知道如何通过mysql激活插件?

Anyone know how to fix this? At least know how to activate the plugins via mysql?

推荐答案

你好 :) 这是我的第一个回答 我希望它能让很多人受益但它有效.

Hello :) this my first answer I hope it benefits so many people because I suffered from this stupid problem and the solution was really awkward and I can not get it but it works.

我来这里是为了讨论登录后出现白屏死机的解决方案,您会看到这个白色的东西,而不是用户角色是什么的管理面板.

I'm here to talk about the solution for the white screen of death that comes after logging in and you get this white thing instead of the admin panel what ever the user role was.

有上面提到的常见解决方案.就我而言,我只有一个插件,并且对其进行了很多更改.另外我在wordpress中编辑了footer.php.我发现 WSOD(死机白屏)在插件的一个 php 文件中进行第一次更改后出现.我以前做更改的方式是通过文本编辑器在我的计算机中编辑php文件,然后我将通过ftp上传更改后的php以替换旧的php,然后问题就开始了.Abd 当我恢复步骤并返回原始文件时,一切都会恢复正常.

There is the common solutions as mentioned above. In my case I had only one plugin and I did a lot of changes on it. Also I edited the footer.php in wordpress. I found out the WSOD ( White Screen Of Death ) comes out after the first changes in one of the php files of the plugin. The way I used to do the changes is by editing the php file in my computer through text editor then I would upload the changed php through ftp to replace the old one and then the problem starts. Abd when I revert the step and return the original file every thing goes back to normal.

如果您遇到此问题,解决方案将非常简单,而且我真的不知道为什么以前没有人发布过.

If you having this problem the solution would be very simple and I really don't know why no one have ever post it before.

解决方案是简单地通过管理面板中的编辑器进行更改.有两个编辑器,一个用于主题,另一个用于插件.

The solution would be by simply putting your changes through the editor you have in the admin panel. There is two editors, one for the theme and the other one for the plugins.

在管理面板中打开您要修改的插件的编辑器,在管理面板网页中的文本编辑器中插入您想要的更改,完成后点击更新文件按钮.

Open the editor in the admin panel for the plugin you want to modify insert the changes that you want in the text editor you have in the admin panel web page and when you are done click on the update file button.

很高兴您最终会进行修改,并且不会出现白屏死机.

And happily you will end up with your modification and NO White Screen Of Death.

希望你们都有一个光明的未来,不再有 WSOD.

I hope you all a bright future with no more WSOD.

更新:通过研究和尝试更多,我发现编辑文件并使用 UTF-8 编码会导致问题,以避免编辑文件并确保编码是 ANSI 或 UTF-8 没有 BOM

UPDATE: through researching and trying more , I found out that editing the files and Encoding it with UTF-8 will lead to the problem to avoide that edit the file and make sure the encoding is either ANSI or UTF-8 without BOM

这篇关于著名的 Wordpress 白屏死机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆