diff --git a/wp-import.php b/wp-import.php index 3b07ada..2e27ce2 100644 --- a/wp-import.php +++ b/wp-import.php @@ -6,6 +6,9 @@ if ( ! file_exists( 'wp-content/mysql.sql' ) ) { return; } +// Create backup of the current database. +echo shell_exec( 'wp db export ./wp-content/mysql-backup.sql' ); + $staging_domain = shell_exec( 'wp option get siteurl' ); echo shell_exec( 'wp db import ./wp-content/mysql.sql' );