Backup DB before any operation.
This commit is contained in:
@@ -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' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user