Skip to content

Commit 795929f

Browse files
committed
fix(clone-utils): add --skip-ssl option to db export/import commands
1 parent 3518dd4 commit 795929f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/clone/clone-utils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function copy_site_db( Site $source, Site $destination ) {
2727

2828
$source->rsp->add_step( 'clone-export-db', function () use ( $source, $destination, $filename ) {
2929
$source_site_name = $source->site_details['site_url'];
30-
$export_command = 'ee shell --skip-tty ' . $source_site_name . ' --command=\'wp db export ../' . $filename . '\'';
30+
$export_command = 'ee shell --skip-tty ' . $source_site_name . ' --command=\'wp db export --skip-ssl ../' . $filename . '\'';
3131

3232
if ( $source->execute( $export_command )->return_code ) {
3333
throw new \Exception( 'Unable to export database on source. Please check for file system permissions and disk space.' );
@@ -55,7 +55,7 @@ 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 import ../' . $filename . '\'';
58+
$import_command = 'ee shell --skip-tty ' . $destination_site_name . ' --command=\'wp db query --skip-ssl < ../' . $filename . '\'';
5959

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

0 commit comments

Comments
 (0)