Cloning of WordPress instance fails: information on the username and the password in your `wp-config.php` file is not correct

Created:

2017-07-03 17:32:03 UTC

Modified:

2017-08-18 03:09:28 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cloning of WordPress instance fails: information on the username and the password in your `wp-config.php` file is not correct

Applicable to:

  • Plesk Onyx 17.5 for Linux

Note: This article has the reference to the issue with the fix available:

  • #EXTWPTOOLK-669 "Removing the database of a cloned website resulted in inability to clone it again to the same domain and with the same database name."
    Fixed in:
Please consider updating your server:

Symptoms

The following error occurs while cloning WordPress instance:

Can’t select database. We were able to connect to the database server (which means your username and password is okay) but not able to select the `wordpress_a` database.

When initializing cloning on the same instance again another the following error is observed:

Error while cloning WordPress
Error establishing a database connection. This means that the information on the username and the password in your `wp-config.php` file is not correct, or we can not reach the database server on` localhost`. Your host's database server might be down.

The database with the same name was earlier deleted.

Cause

WordPress Toolkit bug EXTWPTOOLK-669 . The bug will be fixed in one of the next Plesk updates.

Resolution

Until the fix became available, the following steps are required to resolve the issue:

1. Change the name for the database of cloned instance in Plesk interface. The error regarding existing MySQL user will be displayed. For example:

The user wordpress_a already exists.

2. Connect to the server via SSH , create the backup of "mysql" database and log into the "mysql" database:

# plesk db dump mysql > mysql.sql
# plesk db mysql

3. Remove the database user mentioned in the error message:

mysql> delete from user where User="wordpress_a";
Have more questions? Submit a request
Please sign in to leave a comment.