Version Description
- Fixed a bug occurred when connecting with remote storage in some cases.
- Fixed some bugs in the plugin code.
- Optimized the plugin UI.
Download this release
Release Info
Developer | wpvivid |
Plugin | Migration, Backup, Staging – WPvivid |
Version | 0.9.35 |
Comparing to | |
See all releases |
Code changes from version 0.9.34 to 0.9.35
- admin/class-wpvivid-admin.php +46 -1
- admin/css/wpvivid-admin.css +12 -0
- admin/partials/wpvivid-backup-restore-page-display.php +10 -1
- admin/partials/wpvivid-settings-page-display.php +13 -2
- includes/class-wpvivid-mail-report.php +6 -2
- includes/class-wpvivid-restore-database.php +2 -0
- includes/class-wpvivid-restore-site.php +6 -3
- includes/class-wpvivid-restore.php +8 -1
- includes/class-wpvivid-zipclass.php +5 -2
- includes/class-wpvivid.php +54 -4
- includes/customclass/class-wpvivid-google-drive.php +2 -2
- readme.txt +8 -3
- wpvivid-backuprestore.php +3 -2
admin/class-wpvivid-admin.php
CHANGED
@@ -863,6 +863,32 @@ class WPvivid_Admin {
|
|
863 |
<span class="wpvivid-element-space-right">WPvivid support email:</span><input type="text" id="wpvivid_support_mail" value="support@wpvivid.com" readonly />
|
864 |
<span class="wpvivid-element-space-right">Your email:</span><input type="text" id="wpvivid_user_mail" />
|
865 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
<div class="schedule-tab-block">
|
867 |
<input class="button-primary" type="submit" value="<?php esc_attr_e( 'Send Debug Information to Us', 'wpvivid' ); ?>" onclick="wpvivid_click_send_debug_info();" />
|
868 |
</div>
|
@@ -931,11 +957,30 @@ class WPvivid_Admin {
|
|
931 |
location.href =ajaxurl+'?action=wpvivid_create_debug_package';
|
932 |
}
|
933 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
function wpvivid_click_send_debug_info(){
|
935 |
var wpvivid_user_mail = jQuery('#wpvivid_user_mail').val();
|
|
|
|
|
|
|
|
|
936 |
var ajax_data = {
|
937 |
'action': 'wpvivid_send_debug_info',
|
938 |
-
'user_mail': wpvivid_user_mail
|
|
|
|
|
|
|
939 |
};
|
940 |
wpvivid_post_request(ajax_data, function (data) {
|
941 |
try {
|
863 |
<span class="wpvivid-element-space-right">WPvivid support email:</span><input type="text" id="wpvivid_support_mail" value="support@wpvivid.com" readonly />
|
864 |
<span class="wpvivid-element-space-right">Your email:</span><input type="text" id="wpvivid_user_mail" />
|
865 |
</div>
|
866 |
+
<div style="padding:10px 10px 0">
|
867 |
+
<div style="float: left;">
|
868 |
+
<div class="wpvivid-element-space-bottom wpvivid-text-space-right wpvivid-debug-text-fix"
|
869 |
+
style="float: left;">I am using:
|
870 |
+
</div>
|
871 |
+
<div class="wpvivid-element-space-bottom wpvivid-text-space-right" style="float: left;">
|
872 |
+
<select id="wpvivid_debug_type">
|
873 |
+
<option selected="selected" value="sharehost">share hosting</option>
|
874 |
+
<option value="vps">VPS hosting</option>
|
875 |
+
</select>
|
876 |
+
</div>
|
877 |
+
<div style="clear: both;"></div>
|
878 |
+
</div>
|
879 |
+
<div id="wpvivid_debug_host" style="float: left;">
|
880 |
+
<div class="wpvivid-element-space-bottom wpvivid-text-space-right wpvivid-debug-text-fix"
|
881 |
+
style="float: left;">My web hosting provider is:
|
882 |
+
</div>
|
883 |
+
<div class="wpvivid-element-space-bottom wpvivid-text-space-right" style="float: left;">
|
884 |
+
<input type="text" id="wpvivid_host_provider"/></div>
|
885 |
+
<div style="clear: both;"></div>
|
886 |
+
</div>
|
887 |
+
<div style="clear: both;"></div>
|
888 |
+
</div>
|
889 |
+
<div style="padding:0 10px;">
|
890 |
+
<textarea id="wpvivid_debug_comment" class="wp-editor-area" style="width:100%; height: 200px;" autocomplete="off" cols="60" placeholder="Please describe your problem here." ></textarea>
|
891 |
+
</div>
|
892 |
<div class="schedule-tab-block">
|
893 |
<input class="button-primary" type="submit" value="<?php esc_attr_e( 'Send Debug Information to Us', 'wpvivid' ); ?>" onclick="wpvivid_click_send_debug_info();" />
|
894 |
</div>
|
957 |
location.href =ajaxurl+'?action=wpvivid_create_debug_package';
|
958 |
}
|
959 |
|
960 |
+
jQuery("#wpvivid_debug_type").change(function()
|
961 |
+
{
|
962 |
+
if(jQuery(this).val()=='sharehost')
|
963 |
+
{
|
964 |
+
jQuery("#wpvivid_debug_host").show();
|
965 |
+
}
|
966 |
+
else
|
967 |
+
{
|
968 |
+
jQuery("#wpvivid_debug_host").hide();
|
969 |
+
}
|
970 |
+
});
|
971 |
+
|
972 |
function wpvivid_click_send_debug_info(){
|
973 |
var wpvivid_user_mail = jQuery('#wpvivid_user_mail').val();
|
974 |
+
var server_type = jQuery('#wpvivid_debug_type').val();
|
975 |
+
var host_provider = jQuery('#wpvivid_host_provider').val();
|
976 |
+
var comment = jQuery('#wpvivid_debug_comment').val();
|
977 |
+
|
978 |
var ajax_data = {
|
979 |
'action': 'wpvivid_send_debug_info',
|
980 |
+
'user_mail': wpvivid_user_mail,
|
981 |
+
'server_type':server_type,
|
982 |
+
'host_provider':host_provider,
|
983 |
+
'comment':comment
|
984 |
};
|
985 |
wpvivid_post_request(ajax_data, function (data) {
|
986 |
try {
|
admin/css/wpvivid-admin.css
CHANGED
@@ -219,6 +219,18 @@
|
|
219 |
padding:4px 5px;
|
220 |
}
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
.wpvivid-text-space-bottom{margin-bottom: 5px;}
|
223 |
.wpvivid-text-space-right{margin-right: 5px;}
|
224 |
.wpvivid-element-space-bottom{margin-bottom: 10px;}
|
219 |
padding:4px 5px;
|
220 |
}
|
221 |
|
222 |
+
.wpvivid-debug-text-fix{
|
223 |
+
height: 28px;
|
224 |
+
line-height: 28px;
|
225 |
+
}
|
226 |
+
|
227 |
+
@media screen and (max-width: 782px) {
|
228 |
+
.wpvivid-debug-text-fix{
|
229 |
+
height: 36px;
|
230 |
+
line-height: 36px;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
.wpvivid-text-space-bottom{margin-bottom: 5px;}
|
235 |
.wpvivid-text-space-right{margin-right: 5px;}
|
236 |
.wpvivid-element-space-bottom{margin-bottom: 10px;}
|
admin/partials/wpvivid-backup-restore-page-display.php
CHANGED
@@ -842,6 +842,13 @@ function wpvivid_backuppage_add_page_log(){
|
|
842 |
}
|
843 |
|
844 |
function wpvivid_backuppage_add_page_restore(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
845 |
?>
|
846 |
<div class="backup-tab-content wpvivid_tab_restore" id="page-restore" style="display:none;">
|
847 |
<div>
|
@@ -872,6 +879,8 @@ function wpvivid_backuppage_add_page_restore(){
|
|
872 |
<div class="postbox restore_log" id="wpvivid_restore_log"></div>
|
873 |
</div>
|
874 |
<script>
|
|
|
|
|
875 |
jQuery('#wpvivid_clean_restore').click(function(){
|
876 |
wpvivid_delete_incompleted_restore();
|
877 |
});
|
@@ -1351,7 +1360,7 @@ function wpvivid_backuppage_add_page_restore(){
|
|
1351 |
};
|
1352 |
setTimeout(function () {
|
1353 |
wpvivid_restore_timeout = true;
|
1354 |
-
},
|
1355 |
wpvivid_post_request(ajax_data, function(data) {
|
1356 |
}, function(XMLHttpRequest, textStatus, errorThrown) {
|
1357 |
});
|
842 |
}
|
843 |
|
844 |
function wpvivid_backuppage_add_page_restore(){
|
845 |
+
$general_setting=WPvivid_Setting::get_setting(true, "");
|
846 |
+
if(isset($general_setting['options']['wpvivid_common_setting']['restore_max_execution_time'])){
|
847 |
+
$restore_max_execution_time = intval($general_setting['options']['wpvivid_common_setting']['restore_max_execution_time']);
|
848 |
+
}
|
849 |
+
else{
|
850 |
+
$restore_max_execution_time = WPVIVID_RESTORE_MAX_EXECUTION_TIME;
|
851 |
+
}
|
852 |
?>
|
853 |
<div class="backup-tab-content wpvivid_tab_restore" id="page-restore" style="display:none;">
|
854 |
<div>
|
879 |
<div class="postbox restore_log" id="wpvivid_restore_log"></div>
|
880 |
</div>
|
881 |
<script>
|
882 |
+
var restore_max_exection_time = '<?php echo $restore_max_execution_time; ?>';
|
883 |
+
restore_max_exection_time = restore_max_exection_time * 1000;
|
884 |
jQuery('#wpvivid_clean_restore').click(function(){
|
885 |
wpvivid_delete_incompleted_restore();
|
886 |
});
|
1360 |
};
|
1361 |
setTimeout(function () {
|
1362 |
wpvivid_restore_timeout = true;
|
1363 |
+
}, restore_max_exection_time);
|
1364 |
wpvivid_post_request(ajax_data, function(data) {
|
1365 |
}, function(XMLHttpRequest, textStatus, errorThrown) {
|
1366 |
});
|
admin/partials/wpvivid-settings-page-display.php
CHANGED
@@ -544,6 +544,12 @@ function wpvivid_advanced_settings()
|
|
544 |
$db_method_wpdb = 'checked';
|
545 |
$db_method_pdo = '';
|
546 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
?>
|
548 |
<div class="postbox schedule-tab-block setting-page-content">
|
549 |
<div>
|
@@ -603,10 +609,15 @@ function wpvivid_advanced_settings()
|
|
603 |
<input type="text" placeholder="400" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_compress_setting']['exclude_file_size'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
|
604 |
<div><p><?php _e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid' ); ?></p></div>
|
605 |
</div>
|
606 |
-
<div><strong><?php _e('PHP script execution timeout', 'wpvivid'); ?></strong></div>
|
607 |
<div class="setting-tab-block">
|
608 |
<input type="text" placeholder="600" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_common_setting']['max_execution_time'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />Seconds
|
609 |
-
<div><p><?php _e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of backup down. If the progress of backup encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.
|
|
|
|
|
|
|
|
|
|
|
610 |
</div>
|
611 |
<div><strong><?php _e('PHP Memory Limit for backup', 'wpvivid'); ?></strong></div>
|
612 |
<div class="setting-tab-block">
|
544 |
$db_method_wpdb = 'checked';
|
545 |
$db_method_pdo = '';
|
546 |
}
|
547 |
+
if(isset($general_setting['options']['wpvivid_common_setting']['restore_max_execution_time'])){
|
548 |
+
$restore_max_execution_time = intval($general_setting['options']['wpvivid_common_setting']['restore_max_execution_time']);
|
549 |
+
}
|
550 |
+
else{
|
551 |
+
$restore_max_execution_time = WPVIVID_RESTORE_MAX_EXECUTION_TIME;
|
552 |
+
}
|
553 |
?>
|
554 |
<div class="postbox schedule-tab-block setting-page-content">
|
555 |
<div>
|
609 |
<input type="text" placeholder="400" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_compress_setting']['exclude_file_size'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB
|
610 |
<div><p><?php _e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid' ); ?></p></div>
|
611 |
</div>
|
612 |
+
<div><strong><?php _e('PHP script execution timeout for backup', 'wpvivid'); ?></strong></div>
|
613 |
<div class="setting-tab-block">
|
614 |
<input type="text" placeholder="600" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php esc_attr_e($general_setting['options']['wpvivid_common_setting']['max_execution_time'], 'wpvivid'); ?>" onkeyup="value=value.replace(/\D/g,'')" />Seconds
|
615 |
+
<div><p><?php _e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of backup down. If the progress of backup encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.', 'wpvivid' ); ?></p></div>
|
616 |
+
</div>
|
617 |
+
<div><strong><?php _e('PHP script execution timeout for restore', 'wpvivid'); ?></strong></div>
|
618 |
+
<div class="setting-tab-block">
|
619 |
+
<input type="text" placeholder="1800" option="setting" name="restore_max_execution_time" class="all-options" value="<?php esc_attr_e($restore_max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" />Seconds
|
620 |
+
<div><p><?php _e( 'The time-out is not your server PHP time-out. With the execution time exhausted, our plugin will shut the process of restore down. If the progress of restore encounters a time-out, that means you have a medium or large sized website, please try to scale the value bigger.', 'wpvivid' ); ?></p></div>
|
621 |
</div>
|
622 |
<div><strong><?php _e('PHP Memory Limit for backup', 'wpvivid'); ?></strong></div>
|
623 |
<div class="setting-tab-block">
|
includes/class-wpvivid-mail-report.php
CHANGED
@@ -500,10 +500,14 @@ class WPvivid_mail_report
|
|
500 |
return $body;
|
501 |
}
|
502 |
|
503 |
-
public static function wpvivid_send_debug_info($user_email)
|
|
|
504 |
$send_to = 'support@wpvivid.com';
|
505 |
$subject = 'Debug Information';
|
506 |
-
$body = 'User\'s email
|
|
|
|
|
|
|
507 |
$headers = array('Content-Type: text/html; charset=UTF-8');
|
508 |
|
509 |
$files=WPvivid_error_log::get_error_log();
|
500 |
return $body;
|
501 |
}
|
502 |
|
503 |
+
public static function wpvivid_send_debug_info($user_email,$server_type,$host_provider,$comment)
|
504 |
+
{
|
505 |
$send_to = 'support@wpvivid.com';
|
506 |
$subject = 'Debug Information';
|
507 |
+
$body = '<div>User\'s email: '.$user_email.'.</div>';
|
508 |
+
$body .= '<div>Server type: '.$server_type.'.</div>';
|
509 |
+
$body .= '<div>Host provider: '.$host_provider.'.</div>';
|
510 |
+
$body .= '<div>Comment: '.$comment.'.</div>';
|
511 |
$headers = array('Content-Type: text/html; charset=UTF-8');
|
512 |
|
513 |
$files=WPvivid_error_log::get_error_log();
|
includes/class-wpvivid-restore-database.php
CHANGED
@@ -990,6 +990,8 @@ class WPvivid_RestoreDB
|
|
990 |
$props = get_object_vars($data);
|
991 |
foreach ($props as $key => $value)
|
992 |
{
|
|
|
|
|
993 |
if(is_string($value))
|
994 |
{
|
995 |
$temp->$key =$this->replace_string($value);
|
990 |
$props = get_object_vars($data);
|
991 |
foreach ($props as $key => $value)
|
992 |
{
|
993 |
+
if (strpos($key, "\0")===0)
|
994 |
+
continue;
|
995 |
if(is_string($value))
|
996 |
{
|
997 |
$temp->$key =$this->replace_string($value);
|
includes/class-wpvivid-restore-site.php
CHANGED
@@ -125,10 +125,13 @@ class WPvivid_RestoreSite
|
|
125 |
|
126 |
unset($zip);
|
127 |
|
128 |
-
if (isset($option['wp_core']) && isset($option['is_migrate']))
|
|
|
129 |
if ($option['is_migrate'] == 1) {
|
130 |
-
if (function_exists('save_mod_rewrite_rules'))
|
131 |
-
|
|
|
|
|
132 |
$htaccess_data = file_get_contents(get_home_path() . '.htaccess');
|
133 |
$line = '';
|
134 |
if (preg_match('#AddHandler application/x-httpd-php.*#', $htaccess_data, $matcher)) {
|
125 |
|
126 |
unset($zip);
|
127 |
|
128 |
+
if (isset($option['wp_core']) && isset($option['is_migrate']))
|
129 |
+
{
|
130 |
if ($option['is_migrate'] == 1) {
|
131 |
+
if (function_exists('save_mod_rewrite_rules'))
|
132 |
+
{
|
133 |
+
if (file_exists(get_home_path() . '.htaccess'))
|
134 |
+
{
|
135 |
$htaccess_data = file_get_contents(get_home_path() . '.htaccess');
|
136 |
$line = '';
|
137 |
if (preg_match('#AddHandler application/x-httpd-php.*#', $htaccess_data, $matcher)) {
|
includes/class-wpvivid-restore.php
CHANGED
@@ -13,7 +13,14 @@ class WPvivid_Restore
|
|
13 |
{
|
14 |
public function restore()
|
15 |
{
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
global $wpvivid_plugin;
|
19 |
|
13 |
{
|
14 |
public function restore()
|
15 |
{
|
16 |
+
$general_setting=WPvivid_Setting::get_setting(true, "");
|
17 |
+
if(isset($general_setting['options']['wpvivid_common_setting']['restore_max_execution_time'])){
|
18 |
+
$restore_max_execution_time = intval($general_setting['options']['wpvivid_common_setting']['restore_max_execution_time']);
|
19 |
+
}
|
20 |
+
else{
|
21 |
+
$restore_max_execution_time = WPVIVID_RESTORE_MAX_EXECUTION_TIME;
|
22 |
+
}
|
23 |
+
@set_time_limit($restore_max_execution_time);
|
24 |
|
25 |
global $wpvivid_plugin;
|
26 |
|
includes/class-wpvivid-zipclass.php
CHANGED
@@ -362,7 +362,7 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
|
|
362 |
$ret['result']=WPVIVID_SUCCESS;
|
363 |
foreach ($files as $file)
|
364 |
{
|
365 |
-
$wpvivid_plugin->restore_data->write_log('start
|
366 |
$archive = new PclZip($file);
|
367 |
$zip_ret = $archive->extract(PCLZIP_OPT_PATH, $path,PCLZIP_OPT_REPLACE_NEWER,PCLZIP_CB_PRE_EXTRACT,'wpvivid_function_pre_extract_callback',PCLZIP_OPT_TEMP_FILE_THRESHOLD,16);
|
368 |
if(!$zip_ret)
|
@@ -391,7 +391,7 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
|
|
391 |
$ret['result']=WPVIVID_SUCCESS;
|
392 |
foreach ($files as $file)
|
393 |
{
|
394 |
-
$wpvivid_plugin->restore_data->write_log('start
|
395 |
$wpvivid_plugin->restore_data->write_log('extract child file:'.json_encode($extract_files),'notice');
|
396 |
$archive = new PclZip($file);
|
397 |
$zip_ret = $archive->extract(PCLZIP_OPT_BY_NAME,$extract_files,PCLZIP_OPT_PATH, $path,PCLZIP_OPT_REPLACE_NEWER,PCLZIP_CB_PRE_EXTRACT,'wpvivid_function_pre_extract_callback',PCLZIP_OPT_TEMP_FILE_THRESHOLD,16);
|
@@ -970,6 +970,9 @@ class WPvivid_PclZip_Class
|
|
970 |
{
|
971 |
@unlink($temp_path);
|
972 |
}
|
|
|
|
|
|
|
973 |
file_put_contents($temp_path,print_r(json_encode($json_info),true));
|
974 |
$archive -> add($temp_path,PCLZIP_OPT_REMOVE_PATH,dirname($temp_path));
|
975 |
@unlink($temp_path);
|
362 |
$ret['result']=WPVIVID_SUCCESS;
|
363 |
foreach ($files as $file)
|
364 |
{
|
365 |
+
$wpvivid_plugin->restore_data->write_log('start extracting file:'.$file,'notice');
|
366 |
$archive = new PclZip($file);
|
367 |
$zip_ret = $archive->extract(PCLZIP_OPT_PATH, $path,PCLZIP_OPT_REPLACE_NEWER,PCLZIP_CB_PRE_EXTRACT,'wpvivid_function_pre_extract_callback',PCLZIP_OPT_TEMP_FILE_THRESHOLD,16);
|
368 |
if(!$zip_ret)
|
391 |
$ret['result']=WPVIVID_SUCCESS;
|
392 |
foreach ($files as $file)
|
393 |
{
|
394 |
+
$wpvivid_plugin->restore_data->write_log('start extracting file:'.$file,'notice');
|
395 |
$wpvivid_plugin->restore_data->write_log('extract child file:'.json_encode($extract_files),'notice');
|
396 |
$archive = new PclZip($file);
|
397 |
$zip_ret = $archive->extract(PCLZIP_OPT_BY_NAME,$extract_files,PCLZIP_OPT_PATH, $path,PCLZIP_OPT_REPLACE_NEWER,PCLZIP_CB_PRE_EXTRACT,'wpvivid_function_pre_extract_callback',PCLZIP_OPT_TEMP_FILE_THRESHOLD,16);
|
970 |
{
|
971 |
@unlink($temp_path);
|
972 |
}
|
973 |
+
$json_info['php_version'] = phpversion();
|
974 |
+
global $wpdb;
|
975 |
+
$json_info['mysql_version'] = $wpdb->db_version();
|
976 |
file_put_contents($temp_path,print_r(json_encode($json_info),true));
|
977 |
$archive -> add($temp_path,PCLZIP_OPT_REMOVE_PATH,dirname($temp_path));
|
978 |
@unlink($temp_path);
|
includes/class-wpvivid.php
CHANGED
@@ -3269,6 +3269,7 @@ class WPvivid {
|
|
3269 |
}
|
3270 |
else if ($status === WPVIVID_RESTORE_COMPLETED)
|
3271 |
{
|
|
|
3272 |
$this->restore_data->write_log('disable maintenance mode', 'notice');
|
3273 |
$this->restore_data->delete_temp_files();
|
3274 |
$this->_disable_maintenance_mode();
|
@@ -3300,6 +3301,7 @@ class WPvivid {
|
|
3300 |
try
|
3301 |
{
|
3302 |
$this->_enable_maintenance_mode();
|
|
|
3303 |
$restore=new WPvivid_Restore();
|
3304 |
$common_setting = WPvivid_Setting::get_option('wpvivid_common_setting');
|
3305 |
if(isset($common_setting['restore_memory_limit']) && !empty($common_setting['restore_memory_limit'])){
|
@@ -3355,6 +3357,51 @@ class WPvivid {
|
|
3355 |
die();
|
3356 |
}
|
3357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3358 |
public function deal_restore_shutdown_error()
|
3359 |
{
|
3360 |
if($this->end_shutdown_function===false)
|
@@ -3378,7 +3425,7 @@ class WPvivid {
|
|
3378 |
echo json_encode(array('result'=>WPVIVID_FAILED,'error'=>$message));
|
3379 |
}
|
3380 |
else {
|
3381 |
-
$message = __('
|
3382 |
$this->restore_data->delete_temp_files();
|
3383 |
$this->restore_data->update_error($message);
|
3384 |
$this->restore_data->write_log($message,'error');
|
@@ -4300,6 +4347,7 @@ class WPvivid {
|
|
4300 |
$setting['use_temp_size'] = intval($setting['use_temp_size']);
|
4301 |
$setting['exclude_file_size'] = intval($setting['exclude_file_size']);
|
4302 |
$setting['max_execution_time'] = intval($setting['max_execution_time']);
|
|
|
4303 |
$setting['max_backup_count'] = intval($setting['max_backup_count']);
|
4304 |
$setting['max_resume_count'] = intval($setting['max_resume_count']);
|
4305 |
|
@@ -4321,6 +4369,7 @@ class WPvivid {
|
|
4321 |
$setting_data['wpvivid_local_setting']['save_local'] = $options['options']['wpvivid_local_setting']['save_local'];
|
4322 |
|
4323 |
$setting_data['wpvivid_common_setting']['max_execution_time'] = $setting['max_execution_time'];
|
|
|
4324 |
$setting_data['wpvivid_common_setting']['log_save_location'] = $setting['path'].'/wpvivid_log';
|
4325 |
$setting_data['wpvivid_common_setting']['max_backup_count'] = $setting['max_backup_count'];
|
4326 |
$setting_data['wpvivid_common_setting']['show_admin_bar'] = $setting['show_admin_bar'];
|
@@ -4565,8 +4614,9 @@ class WPvivid {
|
|
4565 |
$parse['host'] = str_replace('/', '_', $parse['host']);
|
4566 |
$parse['host'] = str_replace('.', '_', $parse['host']);
|
4567 |
$domain_tran = $parse['host'].$path;
|
4568 |
-
$
|
4569 |
-
$
|
|
|
4570 |
$export_file_name = 'wpvivid_setting-'.$domain_tran.'-'.$date_format.'-'.$time_format.'.json';
|
4571 |
if (!headers_sent()) {
|
4572 |
header('Content-Disposition: attachment; filename='.$export_file_name);
|
@@ -5476,7 +5526,7 @@ class WPvivid {
|
|
5476 |
$ret['error'] = __('Please enter a valid email address.', 'wpvivid');
|
5477 |
} else {
|
5478 |
$this->ajax_check_security();
|
5479 |
-
$ret = WPvivid_mail_report::wpvivid_send_debug_info($_POST['user_mail']);
|
5480 |
}
|
5481 |
}
|
5482 |
echo json_encode($ret);
|
3269 |
}
|
3270 |
else if ($status === WPVIVID_RESTORE_COMPLETED)
|
3271 |
{
|
3272 |
+
$this->write_litespeed_rule(false);
|
3273 |
$this->restore_data->write_log('disable maintenance mode', 'notice');
|
3274 |
$this->restore_data->delete_temp_files();
|
3275 |
$this->_disable_maintenance_mode();
|
3301 |
try
|
3302 |
{
|
3303 |
$this->_enable_maintenance_mode();
|
3304 |
+
$this->write_litespeed_rule();
|
3305 |
$restore=new WPvivid_Restore();
|
3306 |
$common_setting = WPvivid_Setting::get_option('wpvivid_common_setting');
|
3307 |
if(isset($common_setting['restore_memory_limit']) && !empty($common_setting['restore_memory_limit'])){
|
3357 |
die();
|
3358 |
}
|
3359 |
|
3360 |
+
public function write_litespeed_rule($open=true)
|
3361 |
+
{
|
3362 |
+
$litespeed=false;
|
3363 |
+
if ( isset( $_SERVER['HTTP_X_LSCACHE'] ) && $_SERVER['HTTP_X_LSCACHE'] )
|
3364 |
+
{
|
3365 |
+
$litespeed=true;
|
3366 |
+
}
|
3367 |
+
elseif ( isset( $_SERVER['LSWS_EDITION'] ) && strpos( $_SERVER['LSWS_EDITION'], 'Openlitespeed' ) === 0 ) {
|
3368 |
+
$litespeed=true;
|
3369 |
+
}
|
3370 |
+
elseif ( isset( $_SERVER['SERVER_SOFTWARE'] ) && $_SERVER['SERVER_SOFTWARE'] == 'LiteSpeed' ) {
|
3371 |
+
$litespeed=true;
|
3372 |
+
}
|
3373 |
+
|
3374 |
+
if($litespeed)
|
3375 |
+
{
|
3376 |
+
if (function_exists('insert_with_markers'))
|
3377 |
+
{
|
3378 |
+
$home_path = get_home_path();
|
3379 |
+
$htaccess_file = $home_path . '.htaccess';
|
3380 |
+
|
3381 |
+
if ( ( ! file_exists( $htaccess_file ) && is_writable( $home_path ) ) || is_writable( $htaccess_file ) )
|
3382 |
+
{
|
3383 |
+
if ( got_mod_rewrite() )
|
3384 |
+
{
|
3385 |
+
if($open)
|
3386 |
+
{
|
3387 |
+
$line=array();
|
3388 |
+
$line[]='<IfModule Litespeed>';
|
3389 |
+
$line[]='RewriteEngine On';
|
3390 |
+
$line[]='RewriteRule .* - [E=noabort:1, E=noconntimeout:1]';
|
3391 |
+
$line[]='</IfModule>';
|
3392 |
+
insert_with_markers($htaccess_file,'WPvivid_Restore',$line);
|
3393 |
+
}
|
3394 |
+
else
|
3395 |
+
{
|
3396 |
+
insert_with_markers($htaccess_file,'WPvivid_Restore','');
|
3397 |
+
}
|
3398 |
+
|
3399 |
+
}
|
3400 |
+
}
|
3401 |
+
}
|
3402 |
+
}
|
3403 |
+
}
|
3404 |
+
|
3405 |
public function deal_restore_shutdown_error()
|
3406 |
{
|
3407 |
if($this->end_shutdown_function===false)
|
3425 |
echo json_encode(array('result'=>WPVIVID_FAILED,'error'=>$message));
|
3426 |
}
|
3427 |
else {
|
3428 |
+
$message = __('restore failed error unknown', 'wpvivid');
|
3429 |
$this->restore_data->delete_temp_files();
|
3430 |
$this->restore_data->update_error($message);
|
3431 |
$this->restore_data->write_log($message,'error');
|
4347 |
$setting['use_temp_size'] = intval($setting['use_temp_size']);
|
4348 |
$setting['exclude_file_size'] = intval($setting['exclude_file_size']);
|
4349 |
$setting['max_execution_time'] = intval($setting['max_execution_time']);
|
4350 |
+
$setting['restore_max_execution_time'] = intval($setting['restore_max_execution_time']);
|
4351 |
$setting['max_backup_count'] = intval($setting['max_backup_count']);
|
4352 |
$setting['max_resume_count'] = intval($setting['max_resume_count']);
|
4353 |
|
4369 |
$setting_data['wpvivid_local_setting']['save_local'] = $options['options']['wpvivid_local_setting']['save_local'];
|
4370 |
|
4371 |
$setting_data['wpvivid_common_setting']['max_execution_time'] = $setting['max_execution_time'];
|
4372 |
+
$setting_data['wpvivid_common_setting']['restore_max_execution_time'] = $setting['restore_max_execution_time'];
|
4373 |
$setting_data['wpvivid_common_setting']['log_save_location'] = $setting['path'].'/wpvivid_log';
|
4374 |
$setting_data['wpvivid_common_setting']['max_backup_count'] = $setting['max_backup_count'];
|
4375 |
$setting_data['wpvivid_common_setting']['show_admin_bar'] = $setting['show_admin_bar'];
|
4614 |
$parse['host'] = str_replace('/', '_', $parse['host']);
|
4615 |
$parse['host'] = str_replace('.', '_', $parse['host']);
|
4616 |
$domain_tran = $parse['host'].$path;
|
4617 |
+
$offset=get_option('gmt_offset');
|
4618 |
+
$date_format = date("Ymd",time()+$offset*60*60);
|
4619 |
+
$time_format = date("His",time()+$offset*60*60);
|
4620 |
$export_file_name = 'wpvivid_setting-'.$domain_tran.'-'.$date_format.'-'.$time_format.'.json';
|
4621 |
if (!headers_sent()) {
|
4622 |
header('Content-Disposition: attachment; filename='.$export_file_name);
|
5526 |
$ret['error'] = __('Please enter a valid email address.', 'wpvivid');
|
5527 |
} else {
|
5528 |
$this->ajax_check_security();
|
5529 |
+
$ret = WPvivid_mail_report::wpvivid_send_debug_info($_POST['user_mail'],$_POST['server_type'],$_POST['host_provider'],$_POST['comment']);
|
5530 |
}
|
5531 |
}
|
5532 |
echo json_encode($ret);
|
includes/customclass/class-wpvivid-google-drive.php
CHANGED
@@ -600,7 +600,7 @@ class Wpvivid_Google_drive extends WPvivid_Remote
|
|
600 |
return array('result' =>WPVIVID_SUCCESS);
|
601 |
}
|
602 |
|
603 |
-
public function check_token(
|
604 |
{
|
605 |
if ($client->isAccessTokenExpired())
|
606 |
{
|
@@ -633,7 +633,7 @@ class Wpvivid_Google_drive extends WPvivid_Remote
|
|
633 |
{
|
634 |
global $wpvivid_plugin;
|
635 |
$wpvivid_plugin->wpvivid_log->WriteLog('Check if the server already has the same name file.','notice');
|
636 |
-
if(!$this->delete_exist_file($folder_id
|
637 |
{
|
638 |
return array('result' =>WPVIVID_FAILED,'error'=>'Uploading '.$file.' to Google Drive server failed. '.$file.' might be deleted or network doesn\'t work properly . Please verify the file and confirm the network connection and try again later.');
|
639 |
}
|
600 |
return array('result' =>WPVIVID_SUCCESS);
|
601 |
}
|
602 |
|
603 |
+
public function check_token(&$client)
|
604 |
{
|
605 |
if ($client->isAccessTokenExpired())
|
606 |
{
|
633 |
{
|
634 |
global $wpvivid_plugin;
|
635 |
$wpvivid_plugin->wpvivid_log->WriteLog('Check if the server already has the same name file.','notice');
|
636 |
+
if(!$this->delete_exist_file($folder_id,basename($file),$service))
|
637 |
{
|
638 |
return array('result' =>WPVIVID_FAILED,'error'=>'Uploading '.$file.' to Google Drive server failed. '.$file.' might be deleted or network doesn\'t work properly . Please verify the file and confirm the network connection and try again later.');
|
639 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: move, clone, migrate, copy, backup, restore, auto backup, cloud backup
|
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.3.2
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 0.9.
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
@@ -24,7 +24,7 @@ Click to download [WPvivid Backup for MainWP](https://wordpress.org/plugins/wpvi
|
|
24 |
== WPvivid Backup Pro is Now Available ==
|
25 |
* Customize everything to backup
|
26 |
* Create staging sites and push staging to live site
|
27 |
-
* Incremental backups
|
28 |
* Rollback WordPress core, themes, and plugins
|
29 |
* WordPress Multisite backup
|
30 |
* Advanced remote storage
|
@@ -58,7 +58,8 @@ Restore your WordPress site from a backup with a single click.
|
|
58 |
|
59 |
== Cloud Storage Supported ==
|
60 |
|
61 |
-
Dropbox, Google Drive, Microsoft OneDrive, Amazon S3, DigitalOcean Spaces, SFTP, FTP
|
|
|
62 |
|
63 |
== Site Migration Process ==
|
64 |
1. Install the WPvivid Backup plugin on both the destination site and the sending site.
|
@@ -171,6 +172,10 @@ Thank you for translating WPvivid Backup Plugin to your languages!
|
|
171 |
* [Shohei OKADA](https://ja.gravatar.com/silversword0630)(Japanese)
|
172 |
|
173 |
== Changelog ==
|
|
|
|
|
|
|
|
|
174 |
= 0.9.34 =
|
175 |
- Fixed the PHP 7.4 compatibility issue.
|
176 |
- Fixed: Backing up upload directory failed in some cases.
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.3.2
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 0.9.35
|
8 |
License: GPLv3 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
24 |
== WPvivid Backup Pro is Now Available ==
|
25 |
* Customize everything to backup
|
26 |
* Create staging sites and push staging to live site
|
27 |
+
* Incremental backups
|
28 |
* Rollback WordPress core, themes, and plugins
|
29 |
* WordPress Multisite backup
|
30 |
* Advanced remote storage
|
58 |
|
59 |
== Cloud Storage Supported ==
|
60 |
|
61 |
+
Dropbox, Google Drive, Microsoft OneDrive, Amazon S3, DigitalOcean Spaces, SFTP, FTP.
|
62 |
+
The pro version also supports Wasabi, pCloud and more are coming soon.
|
63 |
|
64 |
== Site Migration Process ==
|
65 |
1. Install the WPvivid Backup plugin on both the destination site and the sending site.
|
172 |
* [Shohei OKADA](https://ja.gravatar.com/silversword0630)(Japanese)
|
173 |
|
174 |
== Changelog ==
|
175 |
+
= 0.9.35 =
|
176 |
+
- Fixed a bug occurred when connecting with remote storage in some cases.
|
177 |
+
- Fixed some bugs in the plugin code.
|
178 |
+
- Optimized the plugin UI.
|
179 |
= 0.9.34 =
|
180 |
- Fixed the PHP 7.4 compatibility issue.
|
181 |
- Fixed: Backing up upload directory failed in some cases.
|
wpvivid-backuprestore.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @wordpress-plugin
|
8 |
* Plugin Name: WPvivid Backup Plugin
|
9 |
* Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
|
10 |
-
* Version: 0.9.
|
11 |
* Author: WPvivid Team
|
12 |
* Author URI: https://wpvivid.com
|
13 |
* License: GPL-3.0+
|
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
21 |
die;
|
22 |
}
|
23 |
|
24 |
-
define( 'WPVIVID_PLUGIN_VERSION', '0.9.
|
25 |
//
|
26 |
define('WPVIVID_RESTORE_INIT','init');
|
27 |
define('WPVIVID_RESTORE_READY','ready');
|
@@ -39,6 +39,7 @@ define('WPVIVID_PLUGIN_DIR_URL',plugin_dir_url(__FILE__).'admin/');
|
|
39 |
define('WPVIVID_PLUGIN_IMAGES_URL',WPVIVID_PLUGIN_URL.'/admin/partials/images/');
|
40 |
//We set a long enough default execution time (10 min) to ensure that the backup process can be completed.
|
41 |
define('WPVIVID_MAX_EXECUTION_TIME',900);
|
|
|
42 |
define('WPVIVID_MEMORY_LIMIT','256M');
|
43 |
define('WPVIVID_RESTORE_MEMORY_LIMIT','256M');
|
44 |
define('WPVIVID_MIGRATE_SIZE', '2048');
|
7 |
* @wordpress-plugin
|
8 |
* Plugin Name: WPvivid Backup Plugin
|
9 |
* Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
|
10 |
+
* Version: 0.9.35
|
11 |
* Author: WPvivid Team
|
12 |
* Author URI: https://wpvivid.com
|
13 |
* License: GPL-3.0+
|
21 |
die;
|
22 |
}
|
23 |
|
24 |
+
define( 'WPVIVID_PLUGIN_VERSION', '0.9.35' );
|
25 |
//
|
26 |
define('WPVIVID_RESTORE_INIT','init');
|
27 |
define('WPVIVID_RESTORE_READY','ready');
|
39 |
define('WPVIVID_PLUGIN_IMAGES_URL',WPVIVID_PLUGIN_URL.'/admin/partials/images/');
|
40 |
//We set a long enough default execution time (10 min) to ensure that the backup process can be completed.
|
41 |
define('WPVIVID_MAX_EXECUTION_TIME',900);
|
42 |
+
define('WPVIVID_RESTORE_MAX_EXECUTION_TIME', 1800);
|
43 |
define('WPVIVID_MEMORY_LIMIT','256M');
|
44 |
define('WPVIVID_RESTORE_MEMORY_LIMIT','256M');
|
45 |
define('WPVIVID_MIGRATE_SIZE', '2048');
|