首页 > 解决方案 > WordPress PHP 警告:需要(/home/cluster-sites/6/e/expertfaculty.org/public_html/wp-includes/class-wp-widget.php):无法打开流

问题描述

我最近将域从旧服务器移动到新的托管包。

我移动了所有以前的文件并备份了 MySQL 数据库。网站未加载,出现以下错误:

Expertfaculty.org [2018 年 10 月 15 日星期一 11:11:39] [错误] [客户端 77.89.128.187:0] PHP 警告:需要(/home/cluster-sites/6/e/expertfaculty.org/public_html/wp-includes /class-wp-widget.php):无法打开流:第 187 行的 /home/cluster-sites/6/e/expertfaculty.org/public_html/wp-settings.php 中没有这样的文件或目录

Expertfaculty.org [2018 年 10 月 15 日星期一 11:11:39] [错误] [客户端 77.89.128.187:0] PHP 致命错误:require():打开失败需要'/home/cluster-sites/6/e/expertfaculty. /home/cluster-sites/6/e/expertfaculty 中的 org/public_html/wp-includes/class-wp-widget.php' (include_path='.:/usr/share/pear72:/usr/share/php') .org/public_html/wp-settings.php 第 187 行

class-wp-widget.php 在 wp-includes 文件中。第 187 行的一个 wp-settings.php 没有任何相关内容。

该网站肯定在旧服务器下工作。不知道出了什么问题。

任何人都可以帮忙吗?谢谢!

标签: phpwordpresswidget

解决方案


编辑新站点文件:wp-config.php

在上面添加以下内容:/* 就是这样,停止编辑!快乐的博客。*/

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );

将 example.com URL 更改为您的新站点 URL。

谢谢。


推荐阅读