WP Staging – DB & File Duplicator & Migration - Version 2.3.3

Version Description

  • New: Compatible up to WordPress 4.9.8
  • New: Better error reporting
  • New: Detect if wp-config.php has been moved one folder level up
  • New: Login options not needed any more - removed
  • Fix: Remove term 'Error' from login page
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 WP Staging – DB & File Duplicator & Migration
Version 2.3.3
Comparing to
See all releases

Code changes from version 2.3.2 to 2.3.3

apps/Backend/Modules/Jobs/Data.php CHANGED
@@ -57,7 +57,7 @@ class Data extends JobExecutable {
57
 
58
  // Fix current step
59
  if( 0 == $this->options->currentStep ) {
60
- $this->options->currentStep = 1;
61
  }
62
  }
63
 
@@ -198,6 +198,47 @@ class Data extends JobExecutable {
198
  $dir = str_replace( $home, '', $siteurl );
199
  return '/' . str_replace( '/', '', $dir ) . '/';
200
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
  /**
203
  * Replace "siteurl" and "home"
@@ -350,38 +391,6 @@ class Data extends JobExecutable {
350
  $this->returnException( "Data Crunching Step 4: Failed to update {$this->prefix}usermeta meta_key database table prefixes; {$this->db->last_error}" );
351
  return false;
352
  }
353
-
354
- // if( false === $this->isTable( $this->prefix . 'options' ) ) {
355
- // return true;
356
- // }
357
- // $this->log( "Updating db option_names in {$this->prefix}options. Error: {$this->db->last_error}" );
358
- //
359
- // // Filter the rows below. Do not update them!
360
- // $filters = array(
361
- // 'wp_mail_smtp',
362
- // 'wp_mail_smtp_version',
363
- // 'wp_mail_smtp_debug',
364
- // );
365
- //
366
- // $filters = apply_filters('wpstg_filter_options_replace', $filters);
367
- //
368
- // $where = "";
369
- // foreach($filters as $filter){
370
- // $where .= " AND option_name <> '" . $filter . "'";
371
- // }
372
- //
373
- // $updateOptions = $this->db->query(
374
- // $this->db->prepare(
375
- // "UPDATE IGNORE {$this->prefix}options SET option_name= replace(option_name, %s, %s) WHERE option_name LIKE %s" . $where, $this->db->prefix, $this->prefix, $this->db->prefix . "_%"
376
- // )
377
- // );
378
- //
379
- // if( !$updateOptions ) {
380
- // $this->log( "Preparing Data Step4: Failed to update db option_names in {$this->prefix}options. Error: {$this->db->last_error}", Logger::TYPE_ERROR );
381
- // $this->returnException( "Data Crunching Step 4: Failed to update db option_names in {$this->prefix}options. Error: {$this->db->last_error}" );
382
- // return false;
383
- // }
384
-
385
  return true;
386
  }
387
 
57
 
58
  // Fix current step
59
  if( 0 == $this->options->currentStep ) {
60
+ $this->options->currentStep = 0;
61
  }
62
  }
63
 
198
  $dir = str_replace( $home, '', $siteurl );
199
  return '/' . str_replace( '/', '', $dir ) . '/';
200
  }
201
+
202
+ /**
203
+ * Copy wp-config.php if it is located outside of root one level up
204
+ * @todo Needs some more testing before it will be released
205
+ * @return boolean
206
+ */
207
+ protected function step0() {
208
+ $this->log( "Preparing Data Step0: Check if wp-config.php is located in root path", Logger::TYPE_INFO );
209
+
210
+ $dir = trailingslashit( dirname( ABSPATH ) );
211
+
212
+ $source = $dir . 'wp-config.php';
213
+
214
+ $destination = trailingslashit( ABSPATH ) . $this->options->cloneDirectoryName . DIRECTORY_SEPARATOR . 'wp-config.php';
215
+
216
+
217
+ // Do not do anything
218
+ if( (!is_file( $source ) && !is_link( $source )) || is_file( $destination ) ) {
219
+ $this->log( "Preparing Data Step0: Skip it", Logger::TYPE_INFO );
220
+ return true;
221
+ }
222
+
223
+ // Copy target of a symbolic link
224
+ if( is_link( $source ) ) {
225
+ $this->log( "Preparing Data Step0: Symbolic link found...", Logger::TYPE_INFO );
226
+ if( !@copy( readlink( $source ), $destination ) ) {
227
+ $errors = error_get_last();
228
+ $this->log( "Preparing Data Step0: Failed to copy wp-config.php! Error: {$errors['message']} {$source} -> {$destination}", Logger::TYPE_ERROR );
229
+ return true;
230
+ }
231
+ }
232
+
233
+ // Copy file wp-config.php
234
+ if( !@copy( $source, $destination ) ) {
235
+ $errors = error_get_last();
236
+ $this->log( "Preparing Data Step0: Failed to copy wp-config.php! Error: {$errors['message']} {$source} -> {$destination}", Logger::TYPE_ERROR );
237
+ return true;
238
+ }
239
+ $this->log( "Preparing Data Step0: Successfull", Logger::TYPE_INFO );
240
+ return true;
241
+ }
242
 
243
  /**
244
  * Replace "siteurl" and "home"
391
  $this->returnException( "Data Crunching Step 4: Failed to update {$this->prefix}usermeta meta_key database table prefixes; {$this->db->last_error}" );
392
  return false;
393
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  return true;
395
  }
396
 
apps/Backend/views/clone/ajax/scan.php CHANGED
@@ -93,10 +93,10 @@
93
  </p>
94
  </div>
95
 
96
- <a href="#" class="wpstg-tab-header" data-id="#wpstg-advanced-settings">
97
  <span class="wpstg-tab-triangle">&#9658;</span>
98
- <?php echo __("Login Options", "wpstg")?>
99
- </a>
100
 
101
  <div class="wpstg-tab-section" id="wpstg-advanced-settings">
102
  <p>
93
  </p>
94
  </div>
95
 
96
+ <!-- <a href="#" class="wpstg-tab-header" data-id="#wpstg-advanced-settings">
97
  <span class="wpstg-tab-triangle">&#9658;</span>
98
+ <?php //echo __("Login Options", "wpstg")?>
99
+ </a>-->
100
 
101
  <div class="wpstg-tab-section" id="wpstg-advanced-settings">
102
  <p>
apps/Core/WPStaging.php CHANGED
@@ -29,7 +29,7 @@ final class WPStaging {
29
  /**
30
  * Plugin version
31
  */
32
- const VERSION = "2.3.2";
33
 
34
  /**
35
  * Plugin name
@@ -44,7 +44,7 @@ final class WPStaging {
44
  /**
45
  * Compatible WP Version
46
  */
47
- const WP_COMPATIBLE = "4.9.7";
48
 
49
  /**
50
  * Slug: Either wp-staging or wp-staging-pro
29
  /**
30
  * Plugin version
31
  */
32
+ const VERSION = "2.3.3";
33
 
34
  /**
35
  * Plugin name
44
  /**
45
  * Compatible WP Version
46
  */
47
+ const WP_COMPATIBLE = "4.9.8";
48
 
49
  /**
50
  * Slug: Either wp-staging or wp-staging-pro
apps/Frontend/loginForm.php CHANGED
@@ -69,7 +69,7 @@ class loginForm {
69
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
70
  <meta name="viewport" content="width=device-width">
71
  <meta name='robots' content='noindex,follow' />
72
- <title>WordPress &rsaquo; Error</title>
73
  <style type="text/css">
74
  html {
75
  background: #f1f1f1;
69
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
70
  <meta name="viewport" content="width=device-width">
71
  <meta name='robots' content='noindex,follow' />
72
+ <title>WordPress &rsaquo; You need to login to access that page</title>
73
  <style type="text/css">
74
  html {
75
  background: #f1f1f1;
readme.txt CHANGED
@@ -9,18 +9,18 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Tags: staging, duplication, cloning, clone, migration, sandbox, test site, testing, backup, post, admin, administration, duplicate posts
10
  Requires at least: 3.6+
11
  Tested up to: 4.9
12
- Stable tag: 2.3.2
13
  Requires PHP: 5.3
14
 
15
  A duplicator plugin! Clone, duplicate and migrate live sites to independent staging and development sites that are available only to administrators.
16
 
17
  == Description ==
18
 
19
- <strong>This cloning and staging plugin is well tested but work in progress. <br><br>
20
  If you find any issue, please open a [support ticket](https://wp-staging.com/support/ "support ticket").
21
  </strong>
22
  <br /><br />
23
- <strong>Note: </strong> For pushing & migrating plugins and theme files to live site, check out [https://wp-staging.com/](https://wp-staging.com/ "WP Staging Pro")
24
  <br /><br />
25
  <blockquote>
26
  <h4> WP Staging for WordPress Migration </h4>
@@ -146,6 +146,13 @@ https://wp-staging.com
146
 
147
  == Changelog ==
148
 
 
 
 
 
 
 
 
149
  = 2.3.2 =
150
  * Fix: Do not search & replace mail addresses
151
 
@@ -195,6 +202,6 @@ Complete changelog: [https://wp-staging.com/changelog.txt](https://wp-staging.co
195
 
196
  == Upgrade Notice ==
197
 
198
- = 2.2.8 =
199
- * New: Compatible to WordPress 4.9.6
200
 
9
  Tags: staging, duplication, cloning, clone, migration, sandbox, test site, testing, backup, post, admin, administration, duplicate posts
10
  Requires at least: 3.6+
11
  Tested up to: 4.9
12
+ Stable tag: 2.3.3
13
  Requires PHP: 5.3
14
 
15
  A duplicator plugin! Clone, duplicate and migrate live sites to independent staging and development sites that are available only to administrators.
16
 
17
  == Description ==
18
 
19
+ <strong>This cloning and staging plugin is well tested and work in progress. <br><br>
20
  If you find any issue, please open a [support ticket](https://wp-staging.com/support/ "support ticket").
21
  </strong>
22
  <br /><br />
23
+ <strong>Note: </strong> For pushing & migrating plugins and theme files to live site, check out the pro version [https://wp-staging.com/](https://wp-staging.com/ "WP Staging Pro")
24
  <br /><br />
25
  <blockquote>
26
  <h4> WP Staging for WordPress Migration </h4>
146
 
147
  == Changelog ==
148
 
149
+ = 2.3.3 =
150
+ * New: Compatible up to WordPress 4.9.8
151
+ * New: Better error reporting
152
+ * New: Detect if wp-config.php has been moved one folder level up
153
+ * New: Login options not needed any more - removed
154
+ * Fix: Remove term 'Error' from login page
155
+
156
  = 2.3.2 =
157
  * Fix: Do not search & replace mail addresses
158
 
202
 
203
  == Upgrade Notice ==
204
 
205
+ = 2.3.3 =
206
+ * New: Compatible to WordPress 4.9.7
207
 
wp-staging.php CHANGED
@@ -7,7 +7,7 @@
7
  * Author: WP-Staging
8
  * Author URI: https://wp-staging.com
9
  * Contributors: ReneHermi, ilgityildirim
10
- * Version: 2.3.2
11
  * Text Domain: wpstg
12
  * Domain Path: /languages/
13
 
7
  * Author: WP-Staging
8
  * Author URI: https://wp-staging.com
9
  * Contributors: ReneHermi, ilgityildirim
10
+ * Version: 2.3.3
11
  * Text Domain: wpstg
12
  * Domain Path: /languages/
13