简体   繁体   English

复制Drupal网站并转移到另一个托管和域

[英]Copying Drupal website and transfer to another hosting and domain

How to copy the site on the CMS Drupal? 如何在CMS Drupal上复制网站? At the moment, I just completed the export of the database, then made a copy of the site from the hosting. 目前,我刚刚完成了数据库的导出,然后从托管中复制了该网站。 And uploaded to the new hosting, in the domain directory, the copied site, and through phpmyadmin imported the database. 并上传到新托管,在域目录中,复制的站点,并通过phpmyadmin导入数据库。 I got this error ... 我收到了这个错误......

Error The website encountered an unexpected error. 错误网站遇到意外错误。 Please try again later. 请稍后再试。 Error messagePDOException: SQLSTATE[HY000] [1045] Access denied for user 'rvsrru_c1035'@'localhost' (using password: YES) in lock_may_be_available() (line 167 of /home/aufhcrw3/public_html/includes/lock.inc). 错误messagePDOException:SQLSTATE [HY000] [1045]在lock_may_be_available()(/home/aufhcrw3/public_html/includes/lock.inc的第167行)中拒绝用户'rvsrru_c1035'@'localhost'(使用密码:YES)的访问权限。

You need to update the settings.php file which is located in sites/default, and add the right database connection credentials. 您需要更新位于sites / default中的settings.php文件,并添加正确的数据库连接凭据。 You'll also need to search and replace any references to the old URL to the new URL in your database, but that's not the problem you're facing right now and is best addressed by another question / google search 您还需要搜索并将对旧URL的任何引用替换为数据库中的新URL,但这不是您现在面临的问题,最好通过其他问题/ Google搜索解决

Have you read the documentation on this? 你有没有看过这方面的文件? Migrating a site 迁移网站

You can use this tutorial 您可以使用本教程

  1. Copy project 复制项目
  2. Create user and add permission. 创建用户并添加权限。 It's you can change on phpmyadmin 这是你可以改变phpmyadmin

在此输入图像描述

  1. Change settings.php 更改settings.php

    $databases = array ( 'default' => array ( 'default' => array ( 'database' => 'yourdatabasename', 'username' => 'databaseusername', 'password' => 'databasepassword', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => '', ), ), );

Import DB. 导入数据库。 As I understand you have already done :) 据我了解你已经做过:)

@Gariko, please change database credentials in settings.php file. @Gariko,请更改settings.php文件中的数据库凭据。 Update database name, database user and password of new environment. 更新新环境的数据库名称,数据库用户和密码。 Check for host also. 检查主机也。 After this clear cache by drush, via db tables or admin. 通过drush,通过db tables或admin清除缓存之后。

If who have this promblem. 如果谁有这个问题。 Reading please this is site - https://www.drupal.org/docs/7/backing-up-and-migrating-a-site/migrating-a-site Next step. 请阅读这是网站 - https://www.drupal.org/docs/7/backing-up-and-migrating-a-site/migrating-a-site下一步。 Create new user for DB in phpmyadmin or cpanel. 在phpmyadmin或cpanel中为DB创建新用户。 And change setting in file - seting.php. 并更改文件中的设置 - seting.php。 See above! 往上看!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM