Skip to content

Commit 2c078b8

Browse files
committed
Merge branch 'develop' for v3.6.4
2 parents 6de478c + de6efed commit 2c078b8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/clone/clone-utils.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ function copy_site_db( Site $source, Site $destination ) {
5555

5656
EE::log( 'Importing database in destination' );
5757

58-
$import_command = 'ee shell --skip-tty ' . $destination_site_name . ' --command=\'wp db query --skip-ssl < ../' . $filename . '\'';
58+
$DB_USER = $destination->site_details['db_user'];
59+
$DB_PASSWORD = $destination->site_details['db_password'];
60+
$DB_HOST = $destination->site_details['db_host'];
61+
$DB_NAME = $destination->site_details['db_name'];
62+
63+
$import_command = "ee shell --skip-tty $destination_site_name --command='mysql --skip-ssl -u\"$DB_USER\" -p\"$DB_PASSWORD\" -h\"$DB_HOST\" \"$DB_NAME\" < ../$filename'";
5964

6065
if ( $destination->execute( $import_command )->return_code ) {
6166
throw new \Exception( 'Unable to import database on destination. Please check for file system permissions and disk space.' );

0 commit comments

Comments
 (0)