mysql - 转移WordPress,尝试了一切

标签 mysql wordpress installation move transfer

我已经在这个问题上苦苦挣扎了好几个小时了。 我目前有一个在domain.com/subdomain 运行的Wordpress 站点。 我想将其转移到domain2.com。

我做了什么:

  • 从 PHPMyAdmin 导出表。
  • 将.SQL 文件中的domain.com/subdomain 全部“替换”为domain2.com。 (我什至使用替换工具来保留字符串长度或其他 -> WP Serialized PHP Replacer )
  • 从domain.com/subdomain 下载整个网站。
  • 已将整个网站上传到domain2.com。
  • 将 wp-config.php 中的数据库信息更改为 domain2.com 上新数据库的正确信息。
  • 已将 .SQL 文件导入到新数据库。

现在会发生什么?好吧,当我导航到domain2.com 时,我收到错误“无法显示网页”。我尝试在domain2.com 上全新安装WordPress,效果非常好。

唯一的事情是,我有数百个页面和插件,其中的设置我真的很想保留,我花了几天时间才把它们整理好,客户的截止日期是明天。

Wordpress Tools > Export工具就像一只披着羊皮的狼,骗我进去,我修好了它。但它没有复制用户信息或插件设置。

最佳答案

确保您的.htaccess 文件如下所示:

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

并且不是这样

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdomain/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdomain/index.php [L]
</IfModule>

# END WordPress

关于mysql - 转移WordPress,尝试了一切,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14329384/

相关文章:

mysql - Tomcat/Hibernate 与 MySql 的连接失败,出现 "Communications link failure"和 "Permission denied"

php - 从博客中按名称排除 Wordpress 类别

qt - 构建后更改Qt安装路径?

MySql - 创建具有多个定义器的 View

mysql - Django - Python 3 - "AssertionError: A model can' t 有多个 AutoField。”

wordpress - 如何停止更新 WordPress 核心的电子邮件通知?

wordpress - 如何在 WordPress 帖子中仅显示评论作者(未注册)的未批准评论?

python - (setup.py) 已安装文件列表

macos - 在 Mac 上运行 prolog

MYSQL 错误 1060 - 重复列