From 5d7daee9b9735dc8858ae79038e8cbac41439dc0 Mon Sep 17 00:00:00 2001
From: Dylan Thomas ' . __( 'Please fill in FTP Connection Details in order to start the migration process.', 'WPMove' ) . '
-
-
-
-
-
-
-
-
-
-
- •
-
-
- •
-
-
- •
-
-
- •
-
-
- •
-
-
- •
-
-
- •
-
-
- •
-
- Click here to go to your site using your new domain.', 'WPMove' ), $new_home_url ); ?>
-
-
-
- get_admin_options();
-
- // Create an array to hold backup files that will be uploaded
- $backups = array();
-
- // If changing the current domain name is also requested...
- if ( ! empty( $_POST['old_domain_name'] ) && ! empty( $_POST['new_domain_name'] ) ) {
-
- // Apply filters to the given domain names
- $old_domain_name = esc_url_raw( $_POST['old_domain_name'] );
- $new_domain_name = esc_url_raw( $_POST['new_domain_name'] );
-
- // Create a backup of the database by changing instances of the old domain name with the newer one
- $db_backups = wpmove_create_db_backup( $wpmove_options['db_chunk_size'], 1, $old_domain_name, $new_domain_name );
-
- } else {
-
- // Create a backup of the database
- $db_backups = wpmove_create_db_backup( $wpmove_options['db_chunk_size'] );
-
- }
-
- // Add names of database backup files to the array of backup files
- $backups = array_merge( $backups, $db_backups );
-
- // Check whether an array is actually posted or not
- if ( isset( $_POST['files'] ) && is_array( $_POST['files'] ) ) {
-
- // Use the POST data directly, if the fallback method is being used
- $files = array_map( 'sanitize_text_field', $_POST['files'] );
-
- // Remove non-empty directories from the array
- $files = array_filter( $files );
-
- // Create chunks from the selected files
- $chunks = wpmove_divide_into_chunks( $files, $wpmove_options['fs_chunk_size'] );
-
- // To prevent overwriting archives created in the same second
- $chunk_id = 1;
-
- // Create an archive of the each chunk
- foreach ( $chunks as $chunk )
- array_push( $backups, wpmove_create_archive( $chunk, ABSPATH, $chunk_id++ ) );
- }
-
- // Check whether creating backups files succeeded or not
- if ( ! file_exists( trailingslashit( WPMOVE_BACKUP_DIR ) . $backups['0'] ) ) {
- _e( 'Could not create backup files. Please make sure the backup directory is writable. For further info, please refer to the documentation.', 'WPMove' );
- } else {
-
- // Upload files and display a success message on success
- if ( $this->upload_files( $backups, sanitize_text_field( $_POST['ftp_password'] ) ) ) {
-
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /var/www/wp-content/plugins/wordpress-move2/backup/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /var/www/wp-content/plugins/wordpress-move2/backup/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /var/www/wp-content/plugins/wordpress-move2/backup/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MB
-
-
-
-
- print_change_domain_name_page();
- break;
- case 'migrate': $this->print_migration_page();
- break;
- case 'complete': $this->print_complete_migration_page();
- break;
- }
- } else {
- ?>
-
-
-
-
-
-
-
- MB
-
-
-
-
- •
- •
- •
- •
-
-
- •
- •
-
-
- •
- •
-
-
- •
-
-
-
-
-
-
-
-
-
-
-
-
- -
- -
-
-
-- - get_admin_options(); - - ?> -
-
-
-
| - - | -- - | -
|---|---|
| - - | -- - | -
- - - - -- get_admin_options(); - - // Instantiate the FTP class - $ftp = new ftp(); - - // Enter Passive Mode if enabled - if ( $wpmove_options['ftp_'.$server.'_passive_mode'] ) - $ftp->Passive( TRUE ); - - echo ''; - - printf( __( 'Connecting to %s:%d...', 'WPMove' ), $wpmove_options['ftp_'.$server.'_hostname'], $wpmove_options['ftp_'.$server.'_port'] ); - $this->flush_output(); - - // Set the hostname and the port - $ftp->SetServer( $wpmove_options['ftp_'.$server.'_hostname'], intval( $wpmove_options['ftp_'.$server.'_port'] ) ); - - // Try connecting to the server - if ( $ftp->connect() ) { - - echo ' ' . __( 'Success!', 'WPMove' ) . '
' . __( 'Please fill in FTP Connection Details in order to start the migration process.', 'WPMove' ) . '
'; + + ?> ++ +
+ +| + | ++ + + | ++ | ++ + + | + +
|---|---|
| + | ++ + + | +
| + | ++ + + | +
| + | ++ + | +
| + | +
+
+
+ /var/www/wp-content/plugins/wordpress-move2/backup/ |
+
| + | +
+ + |
+
| + | ++ + + | +
|---|---|
| + | ++ + + | +
| + | ++ + + | +
| + | ++ + + | +
| + | ++ + | +
| + | +
+
+
+ /var/www/wp-content/plugins/wordpress-move2/backup/ |
+
| + | +
+ + |
+
| + | ++ + + | +
|---|---|
| + | ++ + + | +
| + | ++ + + | +
| + | ++ + + | +
| + | ++ + | +
| + | +
+
+
+ /var/www/wp-content/plugins/wordpress-move2/backup/ |
+
| + | +
+ + |
+
+ +
+| + + | ++ MB + | +
|---|
+ +
+| + + | ++ MB + | +
|---|
+ +
+ + ++ +
+
+ •
+
+ +
+
+ •
+ •
+ •
+ •
+ •
+
+ +
+
+ •
+ •
+ •
+
+ +
+
+ •
+
+ +
+
+ •
+ •
+ •
+
+ +
+
+ •
+ •
+
+ +
+
+ •
+
+ +
+
+ •
+
+ + Click here to go to your site using your new domain.', 'WPMove' ), $new_home_url ); ?> +
++ +
+
+ get_admin_options();
+
+ // Create an array to hold backup files that will be uploaded
+ $backups = array();
+
+ // If changing the current domain name is also requested...
+ if ( ! empty( $_POST['old_domain_name'] ) && ! empty( $_POST['new_domain_name'] ) ) {
+
+ // Apply filters to the given domain names
+ $old_domain_name = esc_url_raw( $_POST['old_domain_name'] );
+ $new_domain_name = esc_url_raw( $_POST['new_domain_name'] );
+
+ // Create a backup of the database by changing instances of the old domain name with the newer one
+ $db_backups = wpmove_create_db_backup( $wpmove_options['db_chunk_size'], 1, $old_domain_name, $new_domain_name );
+
+ } else {
+
+ // Create a backup of the database
+ $db_backups = wpmove_create_db_backup( $wpmove_options['db_chunk_size'] );
+
+ }
+
+ // Add names of database backup files to the array of backup files
+ $backups = array_merge( $backups, $db_backups );
+
+ // Check whether an array is actually posted or not
+ if ( isset( $_POST['files'] ) && is_array( $_POST['files'] ) ) {
+
+ // Use the POST data directly, if the fallback method is being used
+ $files = array_map( 'sanitize_text_field', $_POST['files'] );
+
+ // Remove non-empty directories from the array
+ $files = array_filter( $files );
+
+ // Create chunks from the selected files
+ $chunks = wpmove_divide_into_chunks( $files, $wpmove_options['fs_chunk_size'] );
+
+ // To prevent overwriting archives created in the same second
+ $chunk_id = 1;
+
+ // Create an archive of the each chunk
+ foreach ( $chunks as $chunk )
+ array_push( $backups, wpmove_create_archive( $chunk, ABSPATH, $chunk_id++ ) );
+ }
+
+ // Check whether creating backups files succeeded or not
+ if ( ! file_exists( trailingslashit( WPMOVE_BACKUP_DIR ) . $backups['0'] ) ) {
+ _e( 'Could not create backup files. Please make sure the backup directory is writable. For further info, please refer to the documentation.', 'WPMove' );
+ } else {
+
+ // Upload files and display a success message on success
+ if ( $this->upload_files( $backups, sanitize_text_field( $_POST['ftp_password'] ) ) ) {
+
+ ?>
+
+
+
+ +
+ +
+
+
++ + get_admin_options(); + $server= sanitize_text_field($_GET['server']); + + ?> +
+
+
+
| + + | ++ + | +
|---|---|
| + + | ++ + | +
+ + + + ++ get_admin_options(); + + // Instantiate the FTP class + $ftp = new ftp(); + + // Enter Passive Mode if enabled + if ( $wpmove_options['ftp_'.$server.'_passive_mode'] ) + $ftp->Passive( TRUE ); + + echo ''; + + printf( __( 'Connecting to %s:%d...', 'WPMove' ), $wpmove_options['ftp_'.$server.'_hostname'], $wpmove_options['ftp_'.$server.'_port'] ); + $this->flush_output(); + + // Set the hostname and the port + $ftp->SetServer( $wpmove_options['ftp_'.$server.'_hostname'], intval( $wpmove_options['ftp_'.$server.'_port'] ) ); + + // Try connecting to the server + if ( $ftp->connect() ) { + + echo ' ' . __( 'Success!', 'WPMove' ) . '
|
-
+ |
|
|
-
+ |
|
|
-
+ |
|
|
@@ -400,28 +403,28 @@ function metabox_dev_settings( $wpmove_options ) {
|
-
+ |
|
/var/www/wp-content/plugins/wordpress-move2/backup/ |
- |
@@ -432,194 +435,6 @@ function metabox_dev_settings( $wpmove_options ) {
}
- /**
- * Callback function for the STAGING Connection Details meta box.
- *
- * @param $wpmove_options Plugin settings array
- * @return void
- */
- function metabox_staging_settings( $wpmove_options ) {
-
- ?>
-
-
- + From b7a413b5dbfc6c24559054354d2e5ff09ad57074 Mon Sep 17 00:00:00 2001 From: Dylan Thomas
+ |
+
|
get_admin_options(); + + $server= sanitize_text_field($_GET['server']); + + $ftp_password = $wpmove_options['ftp_'.$server.'_password']; + + + // Create an array to hold backup files that will be uploaded + $backups = array(); + + // Apply filters to the given domain names + $old_domain_name = home_url(); + $new_domain_name = $wpmove_options['ftp_'.$server.'_url']; + + // Create a backup of the database by changing instances of the old domain name with the newer one + $db_backups = wpmove_create_db_backup( $wpmove_options['db_chunk_size'], 1, $old_domain_name, $new_domain_name ); + + + // Add names of database backup files to the array of backup files + $backups = array_merge( $backups, $db_backups ); + + // Check whether an array is actually posted or not + if ( isset( $_POST['files'] ) && is_array( $_POST['files'] ) ) { + + // Use the POST data directly, if the fallback method is being used + $files = array_map( 'sanitize_text_field', $_POST['files'] ); + + // Remove non-empty directories from the array + $files = array_filter( $files ); + + // Create chunks from the selected files + $chunks = wpmove_divide_into_chunks( $files, $wpmove_options['fs_chunk_size'] ); + + // To prevent overwriting archives created in the same second + $chunk_id = 1; + + // Create an archive of the each chunk + foreach ( $chunks as $chunk ) + array_push( $backups, wpmove_create_archive( $chunk, ABSPATH, $chunk_id++ ) ); + } + + // Check whether creating backups files succeeded or not + if ( ! file_exists( trailingslashit( WPMOVE_BACKUP_DIR ) . $backups['0'] ) ) { + _e( 'Could not create backup files. Please make sure the backup directory is writable. For further info, please refer to the documentation.', 'WPMove' ); + } else { + + // Upload files and display a success message on success + if ( $this->upload_files( $backups, sanitize_text_field( $ftp_password ) ) ) { + + ?> + + The database has been uploaded to '.$server.'. Log in to '.$server.' to complete migration.', 'WPMove' ); ?> + + + + + + + + get_admin_options(); + $server= sanitize_text_field($_GET['server']); ?>
- - |
|---|