我安装了这个插件 https://wordpress.org/plugins/wp-gallery-custom-links/并在安装过程中出现错误,在页面刷新之前我没有时间阅读。
现在我的媒体选择器根本没有加载。
我很不走运地完全删除了插件,现在我什至无法访问 wp-admin。出现如下错误:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxx.com/httpdocs/wp-includes/pluggable.php on line 1196
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxx.com/httpdocs/wp-login.php on line 425
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxx.com/httpdocs/wp-login.php on line 438
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-login.php on line 425
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-login.php on line 438
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/caroli.hosterspace.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxxx.com/httpdocs/wp-includes/pluggable.php on line 925
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxx.com/httpdocs/wp-includes/pluggable.php on line 926
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-includes/pluggable.php on line 927
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-includes/pluggable.php on line 1196
我已经下载了一个全新的 wordpress 副本并替换了 wp-admin 文件夹、wp-includes 文件夹、wp-config.php 文件、wp-login.php 文件。
我已尝试更改插件文件夹的名称,但仍然无效,我已尝试删除我的主题以便能够访问 wp-admin,但仍然无效。
我怀疑它可能是数据库问题,但我运气不好找不到问题。任何人都可以帮忙吗?
最佳答案
我已经多次遇到这个问题,正如 Vaviloff 所说,文件开头的空格(<?php
之前)正是您要查找的内容。
一些可能的原因:
- 一个损坏的插件
- 损坏的主题
- 对您的 Wordpress 安装的入侵(您会在文件开头看到一些 eval())
可能的解决方案:
- 检查相关文件:/var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1
并删除
<?php
之前的空格 - 禁用您安装的最新插件,看看它是否有任何作用
- 运行 Wordfence 之类的插件(以防万一),它会扫描您的文件 比手动操作更快并检查与 WP 核心的差异或查找可疑代码(免费版本可以完成所有这些操作)
编辑: 我刚刚看到您无法联系到 wp-admin。这很棘手,但我也遇到过同样的问题。好吧,这是一次入侵(由于一个过时的插件)。
我做了什么?
- 我的主题的备份
- 我的数据库的备份
- 我上传的备份
- 已安装插件列表
- 更改了所有密码
- 删除了服务器的所有相关部分(在所有备份之后)
- 重新安装新的 WP
- 恢复主题/数据库/上传/插件(安装时检查插件的最新更新)
- 安装了 Wordfence,以防万一
关于php - 安装插件后 WordPress 损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34218989/