Browse Source

Backup DB before any operation.

main
Roman Axelrod 5 months ago
parent
commit
8c4a05e01c
  1. 3
      wp-import.php

3
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' );

Loading…
Cancel
Save