WordPress白屏问题

问题描述

本站点出现了WordPress白屏,显示如下:
此站点遇到了致命错误。
了解有关对 WordPress 进行故障排除的更多信息。

问题分析

打开WrodPress的Debug模式

找到根目录下/wp-config.php文件,在其中加入如下语句:

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

取得报错信息

找到/wp-content/debug.log文件,查看报错信息:

[29-Nov-2025 16:13:16 UTC] PHP Fatal error:  Cannot redeclare elFinderAutoloader() (previously declared in /var/www/html/wp-content/plugins/filester/includes/File_manager/lib/php/autoload.php:5) in /var/www/html/wp-content/plugins/file-manager/libs/elFinder/php/autoload.php on line 5

问题是filester和file-manager两个插件同时重复定义elFinderAutoloader函数

问题解决

把filester和file-manager两个插件的其中一个Disable掉

/wp-content/plugins/目录,把filester目录改名为filester_disable

WordPress升级HTTPS后样式丢失

问题描述

WordPress升级HTTPS(SSL)样式丢失,并且管理后台304循环跳转。

问题解决

修改/wp-includes/functions.php文件

加入代码

add_filter('script_loader_src', 'agnostic_script_loader_src', 20,2);
function agnostic_script_loader_src($src, $handle){
    return preg_replace('/^(http|https):/', '', $src);
}
add_filter('style_loader_src', 'agnostic_style_loader_src', 20,2);
function agnostic_style_loader_src($src, $handle){
    return preg_replace('/^(http|https):/', '', $src);
}

修改/wp-config.php文件

加入代码

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

在WordPress后台修改网站地址

网站后台管理-设置-常规选项-WordPress地址(URL)和站点地址(URL)

http://blog.couldhll.com
修改为
https://blog.couldhll.com