Changeset 3242904
- Timestamp:
- 02/19/2025 12:30:58 AM (12 months ago)
- Location:
- wpvivid-backuprestore/trunk
- Files:
-
- 7 edited
-
admin/js/wpvivid-admin.js (modified) (1 diff)
-
admin/partials/wpvivid-settings-page-display.php (modified) (5 diffs)
-
includes/class-wpvivid-backup-uploader.php (modified) (1 diff)
-
includes/class-wpvivid.php (modified) (4 diffs)
-
includes/new_backup/class-wpvivid-backup2.php (modified) (1 diff)
-
readme.txt (modified) (previous)
-
wpvivid-backuprestore.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpvivid-backuprestore/trunk/admin/js/wpvivid-admin.js
r3225201 r3242904 470 470 }); 471 471 }); 472 473 jQuery('input:radio[option=setting][name=backup_params]').click(function() 474 { 475 if(jQuery(this).prop('checked')) 476 { 477 var value = jQuery(this).prop('value'); 478 if(value=='custom') 479 { 480 jQuery('#wpvivid_custom_backup_params').show(); 481 } 482 else 483 { 484 jQuery('#wpvivid_custom_backup_params').hide(); 485 } 486 } 487 }); 472 488 } 473 489 -
wpvivid-backuprestore/trunk/admin/partials/wpvivid-settings-page-display.php
r3205220 r3242904 393 393 } 394 394 catch(err){ 395 alert(err);396 395 jQuery('#wpvivid_calculate_size').css({'pointer-events': 'auto', 'opacity': '1'}); 397 396 jQuery('#wpvivid_clean_junk_file').css({'pointer-events': 'auto', 'opacity': '1'}); … … 399 398 } 400 399 }, function(XMLHttpRequest, textStatus, errorThrown) { 401 var error_message = wpvivid_output_ajaxerror('calculating server disk space in use by WPvivid', textStatus, errorThrown);402 alert(error_message);403 400 jQuery('#wpvivid_calculate_size').css({'pointer-events': 'auto', 'opacity': '1'}); 404 401 jQuery('#wpvivid_clean_junk_file').css({'pointer-events': 'auto', 'opacity': '1'}); … … 614 611 } 615 612 613 if(isset($common_setting['backup_params'])) 614 { 615 if($common_setting['backup_params'] === 'low') 616 { 617 $backup_params_low = 'checked'; 618 $backup_params_mid = ''; 619 $backup_params_high = ''; 620 $backup_params_custom = ''; 621 $backup_custom_setting_display = 'display: none;'; 622 } 623 else if($common_setting['backup_params'] === 'mid') 624 { 625 $backup_params_low = ''; 626 $backup_params_mid = 'checked'; 627 $backup_params_high = ''; 628 $backup_params_custom = ''; 629 $backup_custom_setting_display = 'display: none;'; 630 } 631 else if($common_setting['backup_params'] === 'high') 632 { 633 $backup_params_low = ''; 634 $backup_params_mid = ''; 635 $backup_params_high = 'checked'; 636 $backup_params_custom = ''; 637 $backup_custom_setting_display = 'display: none;'; 638 } 639 else if($common_setting['backup_params'] === 'custom') 640 { 641 $backup_params_low = ''; 642 $backup_params_mid = ''; 643 $backup_params_high = ''; 644 $backup_params_custom = 'checked'; 645 $backup_custom_setting_display = ''; 646 } 647 else 648 { 649 $backup_params_low = 'checked'; 650 $backup_params_mid = ''; 651 $backup_params_high = ''; 652 $backup_params_custom = ''; 653 $backup_custom_setting_display = 'display: none;'; 654 } 655 } 656 else if(isset($common_setting['compress_file_count'])) 657 { 658 $backup_params_low = ''; 659 $backup_params_mid = ''; 660 $backup_params_high = ''; 661 $backup_params_custom = 'checked'; 662 $backup_custom_setting_display = ''; 663 } 664 else 665 { 666 $backup_params_low = 'checked'; 667 $backup_params_mid = ''; 668 $backup_params_high = ''; 669 $backup_params_custom = ''; 670 $backup_custom_setting_display = 'display: none;'; 671 } 672 616 673 ?> 617 674 <div class="postbox schedule-tab-block wpvivid-setting-addon" style="margin-bottom: 10px; padding-bottom: 0;"> … … 651 708 <div class="postbox schedule-tab-block setting-page-content"> 652 709 <div style="padding-top: 10px;"> 653 <div><strong><?php esc_html_e('Compress Files Every', 'wpvivid-backuprestore'); ?></strong></div> 654 <div class="setting-tab-block"> 655 <input type="text" placeholder="200" option="setting" name="max_file_size" id="wpvivid_max_zip" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $max_file_size)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 656 <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors. When you set a value of 0MB, backups will be split every 4GB.', 'wpvivid-backuprestore' ); ?></div></p> 710 <div class="wpvivid-element-space-bottom"> 711 <strong><?php esc_html_e('Backup performance mode.', 'wpvivid-backuprestore'); ?></strong> 657 712 </div> 658 <div><strong><?php esc_html_e('Exclude the files which are larger than', 'wpvivid-backuprestore'); ?></strong></div> 659 <div class="setting-tab-block"> 660 <input type="text" placeholder="0" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php echo esc_attr($exclude_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 661 <div><p><?php esc_html_e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid-backuprestore' ); ?></p></div> 713 <div class="wpvivid-element-space-bottom"> 714 <label> 715 <input type="radio" option="setting" name="backup_params" value="low" <?php esc_attr_e($backup_params_low); ?> /> 716 <span class="wpvivid-element-space-right"><strong>Low (Balanced)</strong></span><span><?php esc_html_e('Use this default setting for minimal server resource usage, but expect longer backup times. Best for shared hosting or limited resources. Backups are split into 200MB chunks.', 'wpvivid-backuprestore'); ?></span> 717 </label> 662 718 </div> 663 <div><strong><?php esc_html_e('PHP script execution timeout for backup', 'wpvivid-backuprestore'); ?></strong></div> 664 <div class="setting-tab-block"> 665 <input type="text" placeholder="900" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php echo esc_attr($max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?> 666 <div><p><?php esc_html_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-backuprestore' ); ?></p></div> 719 <div class="wpvivid-element-space-bottom"> 720 <label> 721 <input type="radio" option="setting" name="backup_params" value="mid" <?php esc_attr_e($backup_params_mid); ?> /> 722 <span class="wpvivid-element-space-right"><strong>Mid (Standard)</strong></span><span><?php esc_html_e('This mode offers a good balance between backup speed and resource usage. It\'s suitable for most web hosting environments.', 'wpvivid-backuprestore'); ?></span> 723 </label> 667 724 </div> 668 <div><strong><?php esc_html_e('PHP Memory Limit for backup', 'wpvivid-backuprestore'); ?></strong></div> 669 <div class="setting-tab-block"> 670 <input type="text" placeholder="256" option="setting" name="memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 671 <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin to run a backup. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div> 725 <div class="wpvivid-element-space-bottom"> 726 <label> 727 <input type="radio" option="setting" name="backup_params" value="high" <?php esc_attr_e($backup_params_high); ?> /> 728 <span class="wpvivid-element-space-right"><strong>High (Accelerated)</strong></span><span><?php esc_html_e('This mode uses more server resources to reduce backup time, but is only recommended for dedicated servers. If backups time out or get stuck, consider Mid or Low mode. Backups are split into 4GB chunks.', 'wpvivid-backuprestore'); ?></span> 729 </label> 672 730 </div> 673 <div><strong><?php esc_html_e('The number of files compressed to the backup zip each time', 'wpvivid-backuprestore'); ?></strong></div> 674 <div class="setting-tab-block"> 675 <input type="text" placeholder="500" option="setting" name="compress_file_count" id="wpvivid_compress_file_count" class="all-options" value="<?php echo esc_attr($compress_file_count); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Files', 'wpvivid-backuprestore'); ?> 676 <div><p><?php esc_html_e( 'When taking a backup, the plugin will compress this number of files to the backup zip each time. The default value is 500. The lower the value, the longer time the backup will take, but the higher the backup success rate. If you encounter a backup timeout issue, try to decrease this value.', 'wpvivid-backuprestore' ); ?></p></div> 731 <div class="wpvivid-element-space-bottom"> 732 <label> 733 <input type="radio" option="setting" name="backup_params" value="custom" <?php esc_attr_e($backup_params_custom); ?> /> 734 <span class="wpvivid-element-space-right"><strong>Custom (Advanced)</strong></span><span><?php esc_html_e('This mode allows fine-tuning of backup parameters. Incorrect configuration can lead to backup failures. It is recommended to use only with specific guidance from our support team.', 'wpvivid-backuprestore'); ?></span> 735 </label> 677 736 </div> 678 <div><strong><?php esc_html_e('Split a sql file every this size', 'wpvivid-backuprestore'); ?></strong></div> 679 <div class="setting-tab-block"> 680 <input type="text" placeholder="200" option="setting" name="max_sql_file_size" id="wpvivid_max_sql_file_size" class="all-options" value="<?php echo esc_attr($max_sql_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('MB', 'wpvivid-backuprestore'); ?> 681 <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors. If you use a value of 0 MB, any backup files won\'t be split.', 'wpvivid-backuprestore' ); ?></p></div> 682 </div> 683 <div><strong><?php esc_html_e('Chunk Size', 'wpvivid-backuprestore'); ?></strong></div> 684 <div class="setting-tab-block"> 685 <input type="text" placeholder="2048" option="setting" name="migrate_size" class="all-options" value="<?php echo esc_attr($migrate_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />KB 686 <div><p><?php esc_html_e('e.g. if you choose a chunk size of 2MB, a 8MB file will use 4 chunks. Decreasing this value will break the ISP\'s transmission limit, for example:512KB', 'wpvivid-backuprestore'); ?></p></div> 687 </div> 688 <div><strong><?php esc_html_e('PHP script execution timeout for restore', 'wpvivid-backuprestore'); ?></strong></div> 689 <div class="setting-tab-block"> 690 <input type="text" placeholder="300" option="setting" name="restore_max_execution_time" class="all-options" value="<?php echo esc_attr($restore_max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?> 691 <div><p><?php esc_html_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-backuprestore' ); ?></p></div> 692 </div> 693 <div><strong><?php esc_html_e('PHP Memory Limit for restoration', 'wpvivid-backuprestore'); ?></strong></div> 694 <div class="setting-tab-block"> 695 <input type="text" placeholder="256" option="setting" name="restore_memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $restore_memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 696 <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin in restore process. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div> 697 </div> 698 <div><strong><?php esc_html_e('Maximum rows of data to be processed per request for restoration', 'wpvivid-backuprestore'); ?></strong></div> 699 <div class="setting-tab-block"> 700 <input type="text" placeholder="10000" option="setting" name="replace_rows_pre_request" class="all-options" value="<?php echo esc_attr($replace_rows_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />rows 701 <div><p><?php esc_html_e('The smaller it is, the slower the restoration will be, but the lower the chance of a timeout error.', 'wpvivid-backuprestore'); ?></p></div> 702 </div> 703 <div><strong><?php esc_html_e('Maximum size of sql file to be imported per request for restoration', 'wpvivid-backuprestore'); ?></strong></div> 704 <div class="setting-tab-block"> 705 <input type="text" placeholder="5" option="setting" name="sql_file_buffer_pre_request" class="all-options" value="<?php echo esc_attr($sql_file_buffer_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 706 <div><p><?php esc_html_e('Maximum rows of data to be processed per request.', 'wpvivid-backuprestore'); ?></p></div> 707 </div> 708 <div> 709 <strong>Retrying </strong> 737 <div id="wpvivid_custom_backup_params" style="<?php esc_attr_e($backup_custom_setting_display); ?>"> 738 <div><strong><?php esc_html_e('Compress Files Every', 'wpvivid-backuprestore'); ?></strong></div> 739 <div class="setting-tab-block"> 740 <input type="text" placeholder="200" option="setting" name="max_file_size" id="wpvivid_max_zip" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $max_file_size)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 741 <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors. When you set a value of 0MB, backups will be split every 4GB.', 'wpvivid-backuprestore' ); ?></div></p> 742 </div> 743 <div><strong><?php esc_html_e('Exclude the files which are larger than', 'wpvivid-backuprestore'); ?></strong></div> 744 <div class="setting-tab-block"> 745 <input type="text" placeholder="0" option="setting" name="exclude_file_size" id="wpvivid_ignore_large" class="all-options" value="<?php echo esc_attr($exclude_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 746 <div><p><?php esc_html_e( 'Using the option will ignore the file larger than the certain size in MB when backing up, \'0\' (zero) means unlimited.', 'wpvivid-backuprestore' ); ?></p></div> 747 </div> 748 <div><strong><?php esc_html_e('PHP script execution timeout for backup', 'wpvivid-backuprestore'); ?></strong></div> 749 <div class="setting-tab-block"> 750 <input type="text" placeholder="900" option="setting" name="max_execution_time" id="wpvivid_option_timeout" class="all-options" value="<?php echo esc_attr($max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?> 751 <div><p><?php esc_html_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-backuprestore' ); ?></p></div> 752 </div> 753 <div><strong><?php esc_html_e('PHP Memory Limit for backup', 'wpvivid-backuprestore'); ?></strong></div> 754 <div class="setting-tab-block"> 755 <input type="text" placeholder="256" option="setting" name="memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 756 <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin to run a backup. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div> 757 </div> 758 <div><strong><?php esc_html_e('The number of files compressed to the backup zip each time', 'wpvivid-backuprestore'); ?></strong></div> 759 <div class="setting-tab-block"> 760 <input type="text" placeholder="500" option="setting" name="compress_file_count" id="wpvivid_compress_file_count" class="all-options" value="<?php echo esc_attr($compress_file_count); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Files', 'wpvivid-backuprestore'); ?> 761 <div><p><?php esc_html_e( 'When taking a backup, the plugin will compress this number of files to the backup zip each time. The default value is 500. The lower the value, the longer time the backup will take, but the higher the backup success rate. If you encounter a backup timeout issue, try to decrease this value.', 'wpvivid-backuprestore' ); ?></p></div> 762 </div> 763 <div><strong><?php esc_html_e('Split a sql file every this size', 'wpvivid-backuprestore'); ?></strong></div> 764 <div class="setting-tab-block"> 765 <input type="text" placeholder="200" option="setting" name="max_sql_file_size" id="wpvivid_max_sql_file_size" class="all-options" value="<?php echo esc_attr($max_sql_file_size); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('MB', 'wpvivid-backuprestore'); ?> 766 <div><p><?php esc_html_e( 'Some web hosting providers limit large zip files (e.g. 200MB), and therefore splitting your backup into many parts is an ideal way to avoid hitting the limitation if you are running a big website. Please try to adjust the value if you are encountering backup errors. If you use a value of 0 MB, any backup files won\'t be split.', 'wpvivid-backuprestore' ); ?></p></div> 767 </div> 768 <div><strong><?php esc_html_e('Chunk Size', 'wpvivid-backuprestore'); ?></strong></div> 769 <div class="setting-tab-block"> 770 <input type="text" placeholder="2048" option="setting" name="migrate_size" class="all-options" value="<?php echo esc_attr($migrate_size); ?>" onkeyup="value=value.replace(/\D/g,'')" />KB 771 <div><p><?php esc_html_e('e.g. if you choose a chunk size of 2MB, a 8MB file will use 4 chunks. Decreasing this value will break the ISP\'s transmission limit, for example:512KB', 'wpvivid-backuprestore'); ?></p></div> 772 </div> 773 <div> 774 <strong>Retrying </strong> 710 775 <select option="setting" name="max_resume_count"> 711 <?php 712 for($resume_count=3; $resume_count<10; $resume_count++){ 713 if($resume_count === $wpvivid_max_resume_count){ 714 echo '<option selected="selected" value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>'; 776 <?php 777 for($resume_count=3; $resume_count<10; $resume_count++){ 778 if($resume_count === $wpvivid_max_resume_count){ 779 echo '<option selected="selected" value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>'; 780 } 781 else{ 782 echo '<option value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>'; 783 } 715 784 } 716 else{ 717 echo '<option value="'.esc_attr($resume_count).'">'.esc_html($resume_count).'</option>'; 718 } 719 } 720 ?> 785 ?> 721 786 </select> 722 <strong> times when encountering a time-out error</strong> 787 <strong> times when encountering a time-out error</strong> 788 </div> 723 789 </div> 724 790 </div> … … 734 800 <div class="setting-tab-block"> 735 801 <input type="text" placeholder="1000" option="setting" name="unzip_files_pre_request" class="all-options" value="<?php echo esc_attr($unzip_files_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />Files are unzipped every PHP request 802 </div> 803 <div><strong><?php esc_html_e('PHP script execution timeout for restore', 'wpvivid-backuprestore'); ?></strong></div> 804 <div class="setting-tab-block"> 805 <input type="text" placeholder="300" option="setting" name="restore_max_execution_time" class="all-options" value="<?php echo esc_attr($restore_max_execution_time); ?>" onkeyup="value=value.replace(/\D/g,'')" /><?php esc_html_e('Seconds', 'wpvivid-backuprestore'); ?> 806 <div><p><?php esc_html_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-backuprestore' ); ?></p></div> 807 </div> 808 <div><strong><?php esc_html_e('PHP Memory Limit for restoration', 'wpvivid-backuprestore'); ?></strong></div> 809 <div class="setting-tab-block"> 810 <input type="text" placeholder="256" option="setting" name="restore_memory_limit" class="all-options" value="<?php echo esc_attr(str_replace('M', '', $restore_memory_limit)); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 811 <div><p><?php esc_html_e('Adjust this value to apply for a temporary PHP memory limit for WPvivid backup plugin in restore process. We set this value to 256M by default. Increase the value if you encounter a memory exhausted error. Note: some web hosting providers may not support this.', 'wpvivid-backuprestore'); ?></p></div> 812 </div> 813 <div><strong><?php esc_html_e('Maximum rows of data to be processed per request for restoration', 'wpvivid-backuprestore'); ?></strong></div> 814 <div class="setting-tab-block"> 815 <input type="text" placeholder="10000" option="setting" name="replace_rows_pre_request" class="all-options" value="<?php echo esc_attr($replace_rows_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />rows 816 <div><p><?php esc_html_e('The smaller it is, the slower the restoration will be, but the lower the chance of a timeout error.', 'wpvivid-backuprestore'); ?></p></div> 817 </div> 818 <div><strong><?php esc_html_e('Maximum size of sql file to be imported per request for restoration', 'wpvivid-backuprestore'); ?></strong></div> 819 <div class="setting-tab-block"> 820 <input type="text" placeholder="5" option="setting" name="sql_file_buffer_pre_request" class="all-options" value="<?php echo esc_attr($sql_file_buffer_pre_request); ?>" onkeyup="value=value.replace(/\D/g,'')" />MB 821 <div><p><?php esc_html_e('Maximum rows of data to be processed per request.', 'wpvivid-backuprestore'); ?></p></div> 736 822 </div> 737 823 </div> -
wpvivid-backuprestore/trunk/includes/class-wpvivid-backup-uploader.php
r3110132 r3242904 307 307 308 308 $fileName = isset($_REQUEST["name"]) ? sanitize_text_field($_REQUEST["name"]) : $_FILES["file"]["name"]; 309 $validate = wp_check_filetype( $fileName ); 310 if ( $validate['type'] == false ) 311 { 312 echo wp_json_encode(array('result'=>'failed','error'=>"File type is not allowed.")); 313 die(); 314 } 309 315 310 316 $backupdir=WPvivid_Setting::get_backupdir(); -
wpvivid-backuprestore/trunk/includes/class-wpvivid.php
r3225201 r3242904 5540 5540 public function wpvivid_set_general_setting($setting_data, $setting, $options) 5541 5541 { 5542 $setting['exclude_file_size'] = intval($setting['exclude_file_size']); 5543 $setting['max_execution_time'] = intval($setting['max_execution_time']); 5542 $setting_data['wpvivid_common_setting']['backup_params'] = $setting['backup_params']; 5543 if($setting_data['wpvivid_common_setting']['backup_params'] === 'low') 5544 { 5545 $setting_data['wpvivid_common_setting']['compress_file_count'] = 500; 5546 $setting_data['wpvivid_common_setting']['max_file_size'] = '200'; 5547 $setting_data['wpvivid_common_setting']['max_sql_file_size'] = 400; 5548 $setting_data['wpvivid_common_setting']['exclude_file_size'] = 0; 5549 $setting_data['wpvivid_common_setting']['max_execution_time'] = 300; 5550 $setting_data['wpvivid_common_setting']['memory_limit'] = '512M'; 5551 $setting_data['wpvivid_common_setting']['migrate_size'] = '2048'; 5552 $setting_data['wpvivid_common_setting']['max_resume_count'] = 6; 5553 } 5554 else if($setting_data['wpvivid_common_setting']['backup_params'] === 'mid') 5555 { 5556 $setting_data['wpvivid_common_setting']['compress_file_count'] = 2000; 5557 $setting_data['wpvivid_common_setting']['max_file_size'] = '1024'; 5558 $setting_data['wpvivid_common_setting']['max_sql_file_size'] = 1024; 5559 $setting_data['wpvivid_common_setting']['exclude_file_size'] = 0; 5560 $setting_data['wpvivid_common_setting']['max_execution_time'] = 500; 5561 $setting_data['wpvivid_common_setting']['memory_limit'] = '512M'; 5562 $setting_data['wpvivid_common_setting']['migrate_size'] = '2048'; 5563 $setting_data['wpvivid_common_setting']['max_resume_count'] = 6; 5564 } 5565 else if($setting_data['wpvivid_common_setting']['backup_params'] === 'high') 5566 { 5567 $setting_data['wpvivid_common_setting']['compress_file_count'] = 10000; 5568 $setting_data['wpvivid_common_setting']['max_file_size'] = '4080'; 5569 $setting_data['wpvivid_common_setting']['max_sql_file_size'] = 4080; 5570 $setting_data['wpvivid_common_setting']['exclude_file_size'] = 0; 5571 $setting_data['wpvivid_common_setting']['max_execution_time'] = 900; 5572 $setting_data['wpvivid_common_setting']['memory_limit'] = '512M'; 5573 $setting_data['wpvivid_common_setting']['migrate_size'] = '2048'; 5574 $setting_data['wpvivid_common_setting']['max_resume_count'] = 6; 5575 } 5576 else if($setting_data['wpvivid_common_setting']['backup_params'] === 'custom') 5577 { 5578 $setting_data['wpvivid_common_setting']['compress_file_count'] = intval($setting['compress_file_count']); 5579 $setting_data['wpvivid_common_setting']['max_file_size'] = $setting['max_file_size']; 5580 $setting_data['wpvivid_common_setting']['max_sql_file_size'] = intval($setting['max_sql_file_size']); 5581 $setting_data['wpvivid_common_setting']['exclude_file_size'] = intval($setting['exclude_file_size']); 5582 $setting_data['wpvivid_common_setting']['max_execution_time'] = intval($setting['max_execution_time']); 5583 $setting_data['wpvivid_common_setting']['memory_limit'] = $setting['memory_limit'].'M'; 5584 $setting_data['wpvivid_common_setting']['migrate_size'] = $setting['migrate_size']; 5585 $setting_data['wpvivid_common_setting']['max_resume_count'] = $setting['max_resume_count']; 5586 } 5587 5588 5544 5589 $setting['restore_max_execution_time'] = intval($setting['restore_max_execution_time']); 5545 5590 $setting['max_backup_count'] = intval($setting['max_backup_count']); 5546 $setting['max_resume_count'] = intval($setting['max_resume_count']);5547 5591 5548 5592 $setting_data['wpvivid_email_setting']['send_to'][] = $setting['send_to']; … … 5552 5596 } 5553 5597 5554 $setting_data['wpvivid_common_setting']['max_file_size'] = $setting['max_file_size'];5555 $setting_data['wpvivid_common_setting']['exclude_file_size'] = $setting['exclude_file_size'];5556 5557 5598 $setting['path']=esc_attr($setting['path']); 5558 5599 $setting_data['wpvivid_local_setting']['path'] = $setting['path']; … … 5568 5609 $setting_data['wpvivid_local_setting']['save_local'] = $options['options']['wpvivid_local_setting']['save_local']; 5569 5610 5570 $setting_data['wpvivid_common_setting']['max_execution_time'] = $setting['max_execution_time'];5571 5611 $setting_data['wpvivid_common_setting']['restore_max_execution_time'] = $setting['restore_max_execution_time']; 5572 5612 $setting_data['wpvivid_common_setting']['log_save_location'] = $setting['path'].'/wpvivid_log'; 5573 5613 $setting_data['wpvivid_common_setting']['max_backup_count'] = $setting['max_backup_count']; 5574 5614 $setting_data['wpvivid_common_setting']['show_admin_bar'] = $setting['show_admin_bar']; 5575 //$setting_data['wpvivid_common_setting']['show_tab_menu'] = $setting['show_tab_menu'];5576 5615 $setting_data['wpvivid_common_setting']['domain_include'] = $setting['domain_include']; 5577 5616 $setting_data['wpvivid_common_setting']['estimate_backup'] = $setting['estimate_backup']; 5578 $setting_data['wpvivid_common_setting']['max_resume_count'] = $setting['max_resume_count'];5579 $setting_data['wpvivid_common_setting']['memory_limit'] = $setting['memory_limit'].'M';5580 5617 $setting_data['wpvivid_common_setting']['restore_memory_limit'] = $setting['restore_memory_limit'].'M'; 5581 $setting_data['wpvivid_common_setting']['migrate_size'] = $setting['migrate_size'];5582 5618 $setting_data['wpvivid_common_setting']['ismerge'] = $setting['ismerge']; 5583 5619 $setting_data['wpvivid_common_setting']['db_connect_method'] = $setting['db_connect_method']; … … 5587 5623 5588 5624 //new 5589 $setting_data['wpvivid_common_setting']['compress_file_count'] = intval($setting['compress_file_count']);5590 $setting_data['wpvivid_common_setting']['max_sql_file_size'] = intval($setting['max_sql_file_size']);5591 5625 5592 5626 $setting_data['wpvivid_common_setting']['replace_rows_pre_request'] = intval($setting['replace_rows_pre_request']); -
wpvivid-backuprestore/trunk/includes/new_backup/class-wpvivid-backup2.php
r3205220 r3242904 233 233 $common_setting=get_option('wpvivid_common_setting',array()); 234 234 $settings['db_connect_method']=isset($common_setting['db_connect_method'])?$common_setting['db_connect_method']:'wpdb'; 235 $settings['memory_limit']=isset($common_setting['memory_limit'])?$common_setting['memory_limit']:' 256M';235 $settings['memory_limit']=isset($common_setting['memory_limit'])?$common_setting['memory_limit']:'512M'; 236 236 $settings['max_execution_time']=isset($common_setting['max_execution_time'])?$common_setting['max_execution_time']:900; 237 237 $settings['compress_file_use_cache']=isset($common_setting['compress_file_use_cache'])?$common_setting['compress_file_use_cache']:false; -
wpvivid-backuprestore/trunk/wpvivid-backuprestore.php
r3225201 r3242904 8 8 * Plugin Name: WPvivid Backup Plugin 9 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 210 * Version: 0.9.113 11 11 * Author: WPvivid Backup & Migration 12 12 * Author URI: https://wpvivid.com … … 22 22 } 23 23 24 define( 'WPVIVID_PLUGIN_VERSION', '0.9.11 2' );24 define( 'WPVIVID_PLUGIN_VERSION', '0.9.113' ); 25 25 // 26 26 define('WPVIVID_RESTORE_INIT','init'); … … 41 41 define('WPVIVID_MAX_EXECUTION_TIME',300); 42 42 define('WPVIVID_RESTORE_MAX_EXECUTION_TIME', 300); 43 define('WPVIVID_MEMORY_LIMIT',' 256M');43 define('WPVIVID_MEMORY_LIMIT','512M'); 44 44 define('WPVIVID_RESTORE_MEMORY_LIMIT','512M'); 45 45 define('WPVIVID_MIGRATE_SIZE', '2048');
Note: See TracChangeset
for help on using the changeset viewer.