简体   繁体   English

在Wordpress博客上获取空白页

[英]Getting a blank page on Wordpress blog

I have a Wordpress blog which was working fine until I updated my PHP 5.3 to 5.5. 我有一个Wordpress博客,在将PHP 5.3更新到5.5之前,它一直运行良好。 Now the whole blog is blank. 现在整个博客是空白的。 I cannot view the admin page or even the log in page. 我无法查看管理页面甚至登录页面。 I have tried to fix it after searching a lot on Google, but it is still not working. 在Google上搜索了很多内容后,我试图修复它,但仍然无法正常工作。

I have gone through these solutions: 我已经通过以下解决方案:

As stated in these solution the main reason is either a faulty theme or a plugin. 如这些解决方案所述,主要原因是主题错误或插件。 So I changed my plugin folder to plugins_temp but still got that blank page. 因此,我将插件文件夹更改为plugins_temp,但仍然显示空白页。 Then I changed my themes folder to themes_temp and still I got that same problem. 然后我将主题文件夹更改为themes_temp,但仍然遇到相同的问题。

In the first link that I have submitted here there was this solution # 3 Warning: Cannot modify Header information where they proposed a solution ie wp-config.php will have a blank line after the php '?>' closing tag. 我在此处提交的第一个链接中有此解决方案# 3 Warning: Cannot modify Header information在他们提出解决方案的地方, # 3 Warning: Cannot modify Header information ,即wp-config.php在php'?>'结束标记后将有一个空白行。 I looked at my wp-config.php and there was no closing tag '?>'. 我看着我的wp-config.php,没有结束标记'?>'。 So I added that tag without a blank line and that still didn't solve that blank page issue. 因此,我添加了没有空白行的标记,但仍然无法解决空白页的问题。

I have another PHP website on a different subdomain and it is working fine. 我在另一个子域上有另一个PHP网站,并且工作正常。 In my blog's root folder there is readme.html and when I use this url (myblog/readme.html) then that file gets displayed on the browser so only none of the PHP files are getting rendered. 在我博客的根文件夹中,有readme.html,当我使用此URL(myblog / readme.html)时,该文件将显示在浏览器中,因此仅一个PHP文件都不会被呈现。

Lastly I did try to install a totally fresh Wordpress site but when I go to install.php then none of the files are being executed. 最后,我确实尝试安装了一个全新的Wordpress网站,但是当我进入install.php时,没有文件正在执行。

I am using php5-fpm, Ubuntu 12.04 and NginX. 我正在使用php5-fpm,Ubuntu 12.04和NginX。

Did you try turning on debugging mode? 您是否尝试打开调试模式?

You do that in wp-config.php . 您可以在wp-config.php中执行此操作

Locate define('WP_DEBUG', false); 找到define('WP_DEBUG', false); and set it to true. 并将其设置为true。

Another thing I would try is to make some simple php file and test that if it is working. 我想尝试的另一件事是制作一些简单的php文件,并测试它是否有效。 Something like: 就像是:

<?php

echo "test";

?>

UPDATE: 更新:

Since you probably have problem with php itself, check this question on stackoverflow php not working with nginx on ubuntu : 由于您可能对php本身有问题,因此请在stackoverflow php上检查此问题,使其无法在ubuntu上与nginx配合使用

Some common solutions 一些常见的解决方案

  1. define('WP_DEBUG', false); define('WP_DEBUG',false); set to TRUE - wordpress turns off the error reporting, thats why you get white screens. 设置为TRUE -WordPress将关闭错误报告功能,这就是为什么您会出现白屏的原因。 Turning this on would show the error messages. 打开此选项将显示错误消息。
  2. error_reporting(E_ALL); error_reporting(E_ALL); ini_set('display_errors', '1'); ini_set('display_errors','1'); - if solution above doesnt work, you can manually add this in your wp-config or to the template file that broke down. -如果上述解决方案不起作用,则可以将其手动添加到wp-config或已损坏的模板文件中。
  3. if everything else fails, then you can try tracing the code with something like, die('runs till here') . 如果其他所有操作失败,则可以尝试使用die('runs here here')跟踪代码。 It's a pretty back breaking method but it will surely point you where problem is. 这是一个相当不错的解决方法,但是肯定会指出问题所在。 I did this once and found out later that the white screen was caused by a memory limit exceeded error. 我做了一次,后来发现白屏是由内存限制超出错误引起的。 This kind of error can't be seen with solution 1 & 2. 解决方案1和2无法看到这种错误。

检查您的错误日志,很可能是已安装的其中一个插件与PHP 5.5不兼容。尝试找出哪个插件,并通过wordpress数据库或文件系统将其禁用: http : //www.ostraining.com/blog/wordpress/禁用wordpress插件/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM