繁体   English   中英

移动了Wordpress网站,现在它无法修改标题信息

[英]Moved Wordpress Website, Now it Cannot modify header information

我将基于Wordpress的网站从Apache服务器移到了Nginx服务器,发现某些地方出了问题。

我正在访问一个残缺不全的网站(如:CSS未加载,因此布局完全错误)。 当我尝试访问/ wp-admin登录时,我得到:

Warning: Cannot modify header information - headers already sent by (output started at /var/hpwsites/u_potgieter/website/html/webroot/wp-config.php:1) in /var/hpwsites/u_potgieter/website/html/webroot/wp-login.php on line 390

Warning: Cannot modify header information - headers already sent by (output started at /var/hpwsites/u_potgieter/website/html/webroot/wp-config.php:1) in /var/hpwsites/u_potgieter/website/html/webroot/wp-login.php on line 403

我也从WP Super Cache插件中收到错误消息,但是我可以从PHPmyAdmin禁用它。

查看网站(www.potgieter.nl)并检查Firebug,我得到的印象是PHP没有正确执行。 据我了解Wordpress,它使用PHP来调用帖子,页面和CSS之类的东西。 现在,可以正确调用并显示文本,Javascript和图像。 即使滑块也可以。 但是,大小,位置和颜色都是错误的。

我从SSH运行了ps -ef ,它显示PHP正在运行:

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Jun17 ?        00:00:30 /usr/lib/systemd/systemd --switched-root --system --deserialize 21
u_potgi+ 19752 19744  0 16:29 ?        00:00:00 sshd: u_potgieter@pts/0
u_potgi+ 19753 19752  0 16:29 pts/0    00:00:00 -bash
u_potgi+ 19924 19919  0 16:44 ?        00:00:00 sshd: u_potgieter@notty
u_potgi+ 19925 19924  0 16:44 ?        00:00:00 /usr/libexec/openssh/sftp-server
u_potgi+ 20774 19753  0 17:08 pts/0    00:00:00 php
u_potgi+ 20781 20776  0 17:10 ?        00:00:00 sshd: u_potgieter@pts/1
u_potgi+ 20782 20781  0 17:10 pts/1    00:00:00 -bash
u_potgi+ 20804 20782  0 17:10 pts/1    00:00:00 ps -ef

我正在运行PHP7

~]$ php -v    
PHP 7.0.5 (cli) (built: Apr 19 2016 12:44:23) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

我已经看到了与以下内容相关的问题,并且我已尽我所能尝试遵循此处列出的步骤,但无济于事。

如何修复PHP中的“标头已发送”错误

我正在寻找网站无法正确加载的原因,因此我可以开始寻找解决问题的方法。

任何和所有帮助将不胜感激。

编辑:这是我的wp-config.php的第一位。 第一行没有空格,在<?php标记之前也没有任何其他HTML。

<?php
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information
 * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don't have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */

我不确定您检查链接问题的程度如何,因为答案很明确。

错误消息也很清楚wp-config.php:1

您正在寻找会导致在wp-config.php的第1行产生输出的东西

您可能在打开php标签之前有空格

例如

<!-- empty line here -->
<?php
...
..

暂无
暂无

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

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