转移WordPress,尝试了一切

时间:2013-01-15 00:43:15

标签: 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工具就像一只披着羊皮的狼,骗我进去修好它。但它没有复制用户信息或插件设置。

1 个答案:

答案 0 :(得分:1)

确保.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

NOT 就像这样

# 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