Garicko
Garicko

Reputation: 13

Copying Drupal website and transfer to another hosting and domain

How to copy the site on the 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. 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).

Upvotes: 1

Views: 388

Answers (4)

Sourabh Bhutani
Sourabh Bhutani

Reputation: 663

@Gariko, please change database credentials in settings.php file. 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.

Upvotes: 2

Garicko
Garicko

Reputation: 13

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. Create new user for DB in phpmyadmin or cpanel. And change setting in file - seting.php. See above!

Upvotes: 0

user3875721
user3875721

Reputation:

You can use this tutorial

  1. Copy project
  2. Create user and add permission. It's you can change on phpmyadmin

enter image description here

  1. Change 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 :)

Upvotes: 3

markmoxx
markmoxx

Reputation: 1542

You need to update the settings.php file which is located in sites/default, and add the right database connection credentials. 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

Have you read the documentation on this? Migrating a site

Upvotes: 2

Related Questions