Drupal. 如何将您的网站从一个域名移动到另一个
2013年4月8日
本教程将向您展示如何移动Drupal website from one domain to another.
例如,我们的Drupal站点目前正在 www.template-test.com/drupal 它需要被转移到另一个 domain at www.templatetesting.com/drupal. 以下是你应该遵循的步骤:
- 登录 phpMyAdmin through the hosting 控制面板 你的第一个网站 www.template-test.com/drupal and export the database. 另存为 .zip/.sql 你电脑上的文件.
- 将所有网站文件移动到计算机上的单独文件夹中. 在这个例子中,我们将 backup /的内容drupal/ directory on our FTP. If your hosting 控制面板 有一个FileManager有能力 archive 首先是内容 archive ,然后下载并保存为 .Zip文件到您的计算机.
- 您现在应该有一个文件夹 backup 您的Drupal站点文件的副本和另一个 .sql or .的Zip文件 database.
- 登录 phpMyAdmin through the hosting 控制面板 你的其他网站 www.templatetesting.com/drupal and create a new database.
- 复制新用户的名称、用户名和密码 database 供将来参考.
- 打开new database 您刚刚创建了通过 phpMyAdmin and import the database 将从旧站点导出的文件转储到新站点 database.
- Upload the backup Drupal文件 directory or sub-directory on your new domain i.E在with的情况下 www.templatetesting.com/drupal its a /drupal/ subfolder.
- Go to the \ \网站默认 directory on your new domain 然后打开 settings.php 文件编辑(你可以下载你的电脑上的文件,并打开任何简单的文本 editor 像记事本一样,保存更改后再上传回来)
- 你需要把旧的信息改进去 第208 - 214行 的对应信息 database (step 5 (本教程):
- 将更改保存到文件中(如果在计算机上编辑,也可以将其上传回来),并打开新drupal站点的url地址, i.e. www.templatetesting.com/drupal. If 你已经做了正确的一切,你应该看到这个网站看起来和你的旧的一样 domain.
'database' => ‘your_database_name’, 'username' => ‘your_user_name’, 'password' => ‘your_database_password’, 'host' => ‘your_host_name’,
请随时查看下面的详细视频教程: