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

Version Description

  • Fix: Prevent throwing error when table prefix of table usermeta can not be changed
  • Fix: WP Staging does not run with old WordPress version 3.2
  • Fix: Do not show rating box on posts and pages editor
  • New: Support WordPress 5.0.3
  • New: Add FAQ to footer
Download this release

Release Info

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

Code changes from version 2.4.7 to 2.4.8

apps/Backend/Modules/Jobs/Data.php CHANGED
@@ -388,12 +388,10 @@ class Data extends JobExecutable {
388
 
389
  if( !$update ) {
390
  $this->log( "Preparing Data Step4: Failed to update {$this->prefix}usermeta meta_key database table prefixes; {$this->db->last_error}", Logger::TYPE_ERROR );
391
- $this->returnException( "Preparing Data Step4: Failed to update {$this->prefix}usermeta meta_key database table prefixes; {$this->db->last_error}" );
392
  return false;
393
  }
394
 
395
-
396
-
397
  return true;
398
  }
399
 
388
 
389
  if( !$update ) {
390
  $this->log( "Preparing Data Step4: Failed to update {$this->prefix}usermeta meta_key database table prefixes; {$this->db->last_error}", Logger::TYPE_ERROR );
391
+ $this->returnException( "Preparing Data Step4: Failed to update {$this->prefix}usermeta meta_key database table prefixes {$this->db->last_error}" );
392
  return false;
393
  }
394
 
 
 
395
  return true;
396
  }
397
 
apps/Backend/Notices/Notices.php CHANGED
@@ -93,6 +93,15 @@ class Notices {
93
 
94
  return false;
95
  }
 
 
 
 
 
 
 
 
 
96
 
97
  public function messages() {
98
 
@@ -103,7 +112,7 @@ class Notices {
103
 
104
 
105
  // Show rating review message on all admin pages
106
- if( $this->canShow( "wpstg_rating", 7 ) ) {
107
  require_once "{$viewsNoticesPath}rating.php";
108
  }
109
 
@@ -115,11 +124,11 @@ class Notices {
115
 
116
 
117
  $varsDirectory = \WPStaging\WPStaging::getContentDir();
118
- if( !wp_is_writable( $varsDirectory ) ) {
119
  require_once "{$viewsNoticesPath}/uploads-cache-directory-permission-problem.php";
120
  }
121
  // Staging directory is not writable
122
- if( !wp_is_writable( ABSPATH ) ) {
123
  require_once "{$viewsNoticesPath}/staging-directory-permission-problem.php";
124
  }
125
 
@@ -161,6 +170,7 @@ class Notices {
161
  return false;
162
  }
163
  return true;
 
164
  }
165
 
166
  /**
93
 
94
  return false;
95
  }
96
+ /**
97
+ * Get current page
98
+ * @return string | post, page
99
+ */
100
+ private function getCurrentScreen(){
101
+ if ( function_exists('get_current_screen')) {
102
+ return \get_current_screen()->post_type;
103
+ }
104
+ }
105
 
106
  public function messages() {
107
 
112
 
113
 
114
  // Show rating review message on all admin pages
115
+ if( $this->canShow( "wpstg_rating", 7 ) && $this->getCurrentScreen() !== 'page' && $this->getCurrentScreen() !== 'post' ) {
116
  require_once "{$viewsNoticesPath}rating.php";
117
  }
118
 
124
 
125
 
126
  $varsDirectory = \WPStaging\WPStaging::getContentDir();
127
+ if( !is_writable( $varsDirectory ) ) {
128
  require_once "{$viewsNoticesPath}/uploads-cache-directory-permission-problem.php";
129
  }
130
  // Staging directory is not writable
131
+ if( !is_writeable( ABSPATH ) ) {
132
  require_once "{$viewsNoticesPath}/staging-directory-permission-problem.php";
133
  }
134
 
170
  return false;
171
  }
172
  return true;
173
+
174
  }
175
 
176
  /**
apps/Backend/public/css/wpstg-admin.css CHANGED
@@ -807,6 +807,10 @@
807
  font-style: italic;
808
  }
809
 
 
 
 
 
810
  .wpstg-staging-info {
811
  clear:both;
812
  float: left;
807
  font-style: italic;
808
  }
809
 
810
+ #wpstg-footer a{
811
+ text-decoration: none;
812
+ }
813
+
814
  .wpstg-staging-info {
815
  clear:both;
816
  float: left;
apps/Backend/views/clone/includes/footer.php CHANGED
@@ -1,5 +1,13 @@
1
  <div id="wpstg-error-wrapper">
2
  <div id="wpstg-error-details"></div>
3
  </div>
4
- <div style="clear:both;padding-top:20px;">Something not working? <br>Open a support ticket at <a href="https://wp-staging.com/support" target="_blank" rel="external nofollow">https://wp-staging.com/support</a> and we will resolve it quickly.</div>
5
-
 
 
 
 
 
 
 
 
1
  <div id="wpstg-error-wrapper">
2
  <div id="wpstg-error-details"></div>
3
  </div>
4
+ <div id='wpstg-footer' style="clear:both;padding-top:20px;">
5
+ <br/>
6
+ <strong>&nbsp;&nbsp;FAQ</strong><br/>
7
+ - <a href="https://wp-staging.com/docs/staging-site-redirects-live-site/" target="_blank" rel="external">Can not login to staging site</a> <br/>
8
+ - <a href="https://wp-staging.com/docs/fix-white-or-blank-page-after-pushing-fatal-error-500/" target="_blank" rel="external">Staging site returns blank white page</a> <br/>
9
+ - <a href="https://wp-staging.com/docs/install-wp-staging/" target="_blank" rel="external">More</a><br/><br/>
10
+ <?php echo __('It still does not work?','wp-staging');?>
11
+ <br>
12
+ <?php echo sprintf (__('Open a <a href="%s" target="_blank" rel="external nofollow">support ticket</a> and we will resolve it quickly.', 'wp-staging'), 'https://wp-staging.com/support');?>
13
+ </div>
apps/Core/WPStaging.php CHANGED
@@ -29,7 +29,7 @@ final class WPStaging {
29
  /**
30
  * Plugin version
31
  */
32
- const VERSION = "2.4.7";
33
 
34
  /**
35
  * Plugin name
@@ -44,7 +44,7 @@ final class WPStaging {
44
  /**
45
  * Compatible WP Version
46
  */
47
- const WP_COMPATIBLE = "5.0.2";
48
 
49
  public $wpPath;
50
 
29
  /**
30
  * Plugin version
31
  */
32
+ const VERSION = "2.4.8";
33
 
34
  /**
35
  * Plugin name
44
  /**
45
  * Compatible WP Version
46
  */
47
+ const WP_COMPATIBLE = "5.0.3";
48
 
49
  public $wpPath;
50
 
readme.txt CHANGED
@@ -9,7 +9,7 @@ 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: 5.0
12
- Stable tag: 2.4.7
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.
@@ -146,6 +146,13 @@ https://wp-staging.com
146
 
147
  == Changelog ==
148
 
 
 
 
 
 
 
 
149
  = 2.4.7 =
150
  * New: Support WordPress 5.0.2
151
 
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: 5.0
12
+ Stable tag: 2.4.8
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.
146
 
147
  == Changelog ==
148
 
149
+ = 2.4.8 =
150
+ * Fix: Prevent throwing error when table prefix of table usermeta can not be changed
151
+ * Fix: WP Staging does not run with old WordPress version 3.2
152
+ * Fix: Do not show rating box on posts and pages editor
153
+ * New: Support WordPress 5.0.3
154
+ * New: Add FAQ to footer
155
+
156
  = 2.4.7 =
157
  * New: Support WordPress 5.0.2
158
 
uninstall.php CHANGED
@@ -53,7 +53,9 @@ class uninstall {
53
  delete_option( "wpstg_installDate" );
54
  delete_option( "wpstg_firsttime" );
55
  delete_option( "wpstg_is_staging_site" );
56
- delete_option( "wpstg_settings" );
 
 
57
  delete_option( "wpstg_rmpermalinks_executed" );
58
  delete_option( "wpstg_activation_redirect" );
59
 
53
  delete_option( "wpstg_installDate" );
54
  delete_option( "wpstg_firsttime" );
55
  delete_option( "wpstg_is_staging_site" );
56
+ // Do not delete main wpstg_settings any longer.
57
+ // People forget that this removes their staging sites from the list and ask us often to restore it for them
58
+ //delete_option( "wpstg_settings" );
59
  delete_option( "wpstg_rmpermalinks_executed" );
60
  delete_option( "wpstg_activation_redirect" );
61
 
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.4.7
11
  * Text Domain: wp-staging
12
  * Domain Path: /languages/
13
 
@@ -51,7 +51,7 @@ if( !defined( 'WPSTG_PLUGIN_URL' ) ) {
51
 
52
  // Version
53
  if( !defined( 'WPSTG_VERSION' ) ) {
54
- define( 'WPSTG_VERSION', '2.4.7' );
55
  }
56
 
57
  // Must use version of the optimizer
7
  * Author: WP-Staging
8
  * Author URI: https://wp-staging.com
9
  * Contributors: ReneHermi, ilgityildirim
10
+ * Version: 2.4.8
11
  * Text Domain: wp-staging
12
  * Domain Path: /languages/
13
 
51
 
52
  // Version
53
  if( !defined( 'WPSTG_VERSION' ) ) {
54
+ define( 'WPSTG_VERSION', '2.4.8' );
55
  }
56
 
57
  // Must use version of the optimizer