【问题标题】:Migration site issue迁移站点问题
【发布时间】:2015-01-10 09:18:54
【问题描述】:

我已将我的网站迁移到另一台主机(云主机);新主机配置和测试没有问题。但是,从旧主机复制所有文件后,wp-admin 停止响应,我被困在那里。还有一件事,主页中出现以下错误。有什么想法吗?

警告:包括(/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/wp-cache-base.php):无法打开流:/srv 中没有这样的文件或目录/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php 在第 65 行

警告:include():无法打开“/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/wp-cache-base.php”以供包含(include_path='.:/ opt/sp/php5.6/lib/php') 在 /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php 第 65 行

警告:include_once(/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/ossdl-cdn.php):打开流失败:/srv/users 中没有这样的文件或目录/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php 在第 82 行

警告:include_once(): 未能打开 '/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/ossdl-cdn.php' 以供包含(include_path='.:/opt/ sp/php5.6/lib/php') 在 /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php 第 82 行

【问题讨论】:

  • 试着理解错误。它说你错过了一些文件,比如 cache-base.php,...
  • 关于警告:很明显,您包含的文件不存在。这就是警告所说的。您的问题是什么?
  • 您在迁移网站时,是否修改了数据库文件中的wordpress URL?您必须在那里拥有新网址
  • 按照此网址中的所有步骤操作:codex.wordpress.org/… - 我不确定您为什么将其标记为 .htaccess,因为您没有包含任何 .htaccess 文件,甚至没有提及它。
  • cache-base.php 在那里并且所有文件都已正确复制,即使存在警告中提到的苍蝇也是如此。对于数据库,“siteurl & home”字段已更新。我已经遵循了法典步骤。但我仍然面临同样的警告,并且 wp-admin 无法正常工作

标签: php wordpress .htaccess plugins


【解决方案1】:

通过删除所有 .php 文件并从新的 wordpress 文件夹添加新文件然后只编辑指向我的网站的链接来解决。非常感谢

【讨论】:

    【解决方案2】:

    我在迁移后从主题目录加载 css 并使用 serverpilot 时遇到了类似的问题。 include_path 设置为 php 安装目录,所以我通过将 get_template_directory() 添加到 include 来解决问题。

    <?php include '/style.css'; ?>
    ~~~~~Changed to ~~~~~~~~~~~~~~~
    <?php include( get_template_directory() .  '/style.css'); ?>
    

    看起来你可以为插件做类似的事情。 https://codex.wordpress.org/Function_Reference/plugin_dir_path#Examples

    【讨论】:

      【解决方案3】:

      如果您使用root@xx.xx.xx.xx 用户上传文件,则文件权限不同于使用serverpilot@xx.xx.xx.xx 用户上传。

      在我删除了 root 上传的文件并使用 serverpilot 重新上传之前,我遇到了一个非常相似的问题。

      【讨论】:

        【解决方案4】:

        只需更改路径配置文件 (wp-config.php) 更改路径。

        您可以找到 Defien 路径,只需更改您的托管路径

        define('WPCACHEHOME',你的主机路径);

        这会很好用。

        【讨论】:

          猜你喜欢
          • 2018-10-09
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-03-15
          • 1970-01-01
          相关资源
          最近更新 更多