File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff 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. ' );
You can’t perform that action at this time.
0 commit comments