Backup file will replace ' . esc_attr( $wp_db_backup_search_text ) . ' text with ' . esc_attr( $wp_db_backup_replace_text ) . '. For Regular Database Backup without replace then Go to Dashboard=>Tool=>WP-DB Backup > Settings > '.esc_html__('Search and Replace - Set Blank Fields', 'wpdbbkp').'
'; } else { echo ' '.esc_html__('Create Database Backup', 'wpdbbkp').''; echo ' '.esc_html__('Create Full Backup', 'wpdbbkp').''; echo ''; } include_once 'admin-header-notification.php'; ?> var $j = jQuery.noConflict(); $j(document).ready(function () { var table = $j("#wpdbbkp_table").DataTable({ order: [[0, "desc"]], }); $j(".popoverid").popover(); }); function excludetableall(){ var checkboxes = document.getElementsByClassName("wp_db_exclude_table"); var checked = ""; if($j("#wp_db_exclude_table_all").prop("checked") == true){ checked = "checked"; } $j(".wp_db_exclude_table").each(function() { this.checked = checked; }); } '; echo '| # | '; echo 'Date | '; if($wp_db_log==1){ echo 'Log | '; } echo 'Destination | '; echo 'Type | '; echo 'Backup File | '; echo 'Size | '; echo 'Action | '; echo '||
|---|---|---|---|---|---|---|---|---|---|
| ' . esc_attr( $count ) . ' | '; $curr_date = new DateTime(gmdate( 'Y-m-d H:i:s', $option['date'] )); $curr_date->setTimezone(new DateTimeZone(wp_timezone_string())); echo '' .esc_html($this->wpdbbkp_get_timeago($option['date'])).''; echo ' | '; if($wp_db_log==1){ echo ''; if (!empty($option['log'])) { if(isset($option['type']) && ($option['type'] == 'complete' || $option['type'] == 'database')){ echo ''; echo ''; echo ''; }else{ echo ''; } } echo ' | '; } echo ''; if ( ! empty( $option['destination'] ) ) { $destination = ( explode( ',', $option['destination'] ) ); if ( ! empty( $destination ) && is_array( $destination ) ) { foreach ( $destination as $dest ) { $key = trim( $dest ); if ( empty( $key ) ) { continue; } // Icon if ( array_key_exists( $key, $destination_icon ) ) { echo ' '; } // Do not add any text label; icon-only for all destinations } } } echo ' | '; if(isset($option['type']) && !empty($option['type'])){ if($option['type'] == 'complete'){ echo ''.esc_html__('Full Backup', 'wpdbbkp').' | '; } if($option['type'] == 'database'){ echo ''.esc_html__('Database', 'wpdbbkp').' | '; } }else{ echo 'Database | '; } echo ''; echo ''; echo ' Download | '; echo '' . esc_attr( $this->wp_db_backup_format_bytes( $option['size'] ) ) . ' | '; $remove_backup_href = esc_url( site_url() ) . '/wp-admin/admin.php?page=wp-database-backup&action=removebackup&_wpnonce=' . esc_attr( $nonce ) . '&index=' . esc_attr( ( $count - 1 ) ); echo 'Remove '; if ( isset( $option['search_replace'] ) && 1 === (int) $option['search_replace'] ) { echo ''; } else { $restore_url_href = esc_url( site_url() ) . '/wp-admin/admin.php?page=wp-database-backup&action=restorebackup&_wpnonce=' . esc_attr( $nonce ) . '&index=' . esc_attr( ( $count - 1 ) ); if(isset($option['type']) && !empty($option['type'])){ if($option['type'] == 'complete'){ $restore_url_href = esc_url( site_url() ) . '/wp-admin/admin.php?page=wp-database-backup&action=wpdbbkrestorefullbackup&_wpnonce=' . esc_attr( $nonce ) . '&index=' . esc_attr( ( $count - 1 ) ); } } echo ' Restore '; } echo ' |
'. esc_html__('No Database Backups Created!','wpdbbkp').'
'; } ?>rating .
'; echo ''.esc_html( $update_msg ).'
We take bug reports and feature requests seriously. We're continuously developing & improving this product for the last 2 years with passion and love.
We're constantly expanding the plugin and make it more useful. We have wide variety of features which will fit any use-case.
We have a full time team which helps you with each and every issue regarding Backup for WP.
Unlimited Storage for your websites
We follow industry-best practices to safeguard against unauthorized access, corruption, and loss
Our system is built on a globally distributed cloud infrastructure with 99% uptime
With a Dedicated person helping you with the extension setup and questions.
We're continiously updating our premium features and releasing them.
Be the first one to get the innovative features that we build in the future.
More than 30k Websites, Blogs & E-Commerce website are powered by our Backup for WP making it the #1 Rated Backup for WP plugin in WordPress Community.
Read The ReviewsNo. There are no setup fees on any of our plans
All the plans are year-to-year which are subscribed annually.
We accepts PayPal and Credit Card payments.
Yes! Top-notch customer support for our paid customers is key for a quality product, so we’ll do our very best to resolve any issues you encounter via our support page.
Yes, you can use the plugins but you will not get future updates for those plugins.
Yes. You can cancel your membership by contacting us.
Yes. You can upgrade or downgrade your plan by contacting us.
You are fully protected by our 100% Money Back Guarantee Unconditional. If during the next 14 days you experience an issue that makes the plugin unusable and we are unable to resolve it, we’ll happily offer a full refund.
Yes, you will get updates for all the premium plugins until your subscription is active.
All the plans are year-to-year which are subscribed annually.
Contact a Human
| v |
| ' . esc_attr( number_format_i18n( $no ) ) . ' | '; echo '' . esc_attr( $tablestatus_arr['Name'] ) . ' | '; echo '' . esc_attr( number_format_i18n( isset($tablestatus_arr['Rows'])?$tablestatus_arr['Rows']:0 ) ) . ' | '; $row_usage += $tablestatus_arr['Rows']; echo '
| Total: | '; echo '' . esc_attr( number_format_i18n( $no ) ) . ' Table | '; echo '' . esc_attr( number_format_i18n( $row_usage ) ) . ' Records | '; echo '
'.$message.'
' . esc_html($path) . ' must be a valid directory path');
$this->root = self::conform_dir($path);
}
public static function get_home_path() {
$home_url = home_url();
$site_url = site_url();
$home_path = ABSPATH;
// If site_url contains home_url and they differ then assume WordPress is installed in a sub directory
if ($home_url !== $site_url && strpos($site_url, $home_url) === 0)
$home_path = trailingslashit(substr(self::conform_dir(ABSPATH), 0, strrpos(self::conform_dir(ABSPATH), str_replace($home_url, '', $site_url))));
return self::conform_dir($home_path);
}
private function warning($context, $warning) {
if (empty($context) || empty($warning))
return;
$this->warnings[$context][$_key = md5(implode(':', (array) $warning))] = $warning;
}
public function exclude_string($context = 'zip') {
// Return a comma separated list by default
$separator = ', ';
$wildcard = '';
// The zip command
if ($context === 'zip') {
$wildcard = '*';
$separator = ' -x ';
// The PclZip fallback library
} elseif ($context === 'regex') {
$wildcard = '([\s\S]*?)';
$separator = '|';
}
$wp_all_backup_exclude_dir = get_option('wp_db_backup_exclude_dir');
if (empty($wp_all_backup_exclude_dir)) {
$excludes = WPDB_BACKUPS_DIR;
} else {
$excludes = WPDB_BACKUPS_DIR . '|' . $wp_all_backup_exclude_dir;
}
$excludes = explode("|", $excludes);
if(!empty($excludes) && is_array($excludes)){
foreach ($excludes as $key => &$rule) {
$file = $absolute = $fragment = false;
// Files don't end with /
if (!in_array(substr($rule, -1), array('\\', '/')))
$file = true;
// If rule starts with a / then treat as absolute path
elseif (in_array(substr($rule, 0, 1), array('\\', '/')))
$absolute = true;
// Otherwise treat as dir fragment
else
$fragment = true;
// Strip $this->root and conform
$rule = str_ireplace($this->get_root(), '', untrailingslashit(self::conform_dir($rule)));
// Strip the preceeding slash
if (in_array(substr($rule, 0, 1), array('\\', '/')))
$rule = substr($rule, 1);
// Escape string for regex
if ($context === 'regex')
$rule = str_replace('.', '\.', $rule);
// Convert any existing wildcards
if ($wildcard !== '*' && strpos($rule, '*') !== false)
$rule = str_replace('*', $wildcard, $rule);
// Wrap directory fragments and files in wildcards for zip
if ($context === 'zip' && ( $fragment || $file ))
$rule = $wildcard . $rule . $wildcard;
// Add a wildcard to the end of absolute url for zips
if ($context === 'zip' && $absolute)
$rule .= $wildcard;
// Add and end carrot to files for pclzip but only if it doesn't end in a wildcard
if ($file && $context === 'regex')
$rule .= '$';
// Add a start carrot to absolute urls for pclzip
if ($absolute && $context === 'regex')
$rule = '^' . $rule;
}
}
// Escape shell args for zip command
if ($context === 'zip')
$excludes = array_map('escapeshellarg', array_unique($excludes));
return implode($separator, $excludes);
}
public function get_archive_method() {
return $this->archive_method;
}
public function verify_archive($WPDBFileName) {
// If we've already passed then no need to check again
if (!empty($this->archive_verified))
return true;
// If there are errors delete the backup file.
if ($this->get_errors($this->get_archive_method()) && file_exists($WPDBFileName))
wp_delete_file($WPDBFileName);
// If the archive file still exists assume it's good
if (file_exists($WPDBFileName))
return $this->archive_verified = true;
return false;
}
public function get_files() {
if (!empty($this->files))
return $this->files;
$this->files = array();
// We only want to use the RecursiveDirectoryIterator if the FOLLOW_SYMLINKS flag is available
if (defined('RecursiveDirectoryIterator::FOLLOW_SYMLINKS')) {
$this->files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->get_root(), RecursiveDirectoryIterator::FOLLOW_SYMLINKS), RecursiveIteratorIterator::SELF_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD);
// Skip dot files if the SKIP_Dots flag is available
if (defined('RecursiveDirectoryIterator::SKIP_DOTS'))
$this->files->setFlags(RecursiveDirectoryIterator::SKIP_DOTS + RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
// If RecursiveDirectoryIterator::FOLLOW_SYMLINKS isn't available then fallback to a less memory efficient method
} else {
$this->files = $this->get_files_fallback($this->get_root());
}
return $this->files;
}
public function wpdbbkp_get_timeago( $time )
{
$time = intval($time) > 0 ? intval($time) : time();
$time_difference = time() - $time;
if( $time_difference < 1 ) { return 'less than 1 second ago'; }
$condition = array( 12 * 30 * 24 * 60 * 60 => 'year',
30 * 24 * 60 * 60 => 'month',
24 * 60 * 60 => 'day',
60 * 60 => 'hour',
60 => 'minute',
1 => 'second'
);
foreach( $condition as $secs => $str )
{
$d = $time_difference / $secs;
if( $d >= 1 )
{
$t = floor( $d );
return 'About ' . $t . ' ' . $str . ( $t > 1 ? 's' : '' ) . ' ago';
}
}
}
private function wpdbbkp_append_to_file($file_path, $content_to_append){
global $wp_filesystem;
if (!function_exists('WP_Filesystem')) {
require_once ABSPATH . 'wp-admin/includes/file.php';
}
if (empty($wp_filesystem)) {
WP_Filesystem();
}
if (!$wp_filesystem) {
return false;
}
// Check if the file exists
if ($wp_filesystem->exists($file_path)) {
// Open the file in append mode
$handle = $wp_filesystem->get_contents($file_path);
if ($handle) {
// Append the new content
$result = $wp_filesystem->put_contents($file_path, $handle . $content_to_append, FS_CHMOD_FILE);
return $result !== false;
}
} else {
// If the file doesn't exist, create it with the initial content
$result = $wp_filesystem->put_contents($file_path, $content_to_append, FS_CHMOD_FILE);
return $result !== false;
}
return false;
}
public function wpdbbkp_cloudbackup_notice(){
$user_id = get_current_user_id();
$wpdbbkp_cloudbackup_notice = get_option( 'wpdb_clouddrive_token', false );
if( $wpdbbkp_cloudbackup_notice ){
return;
}
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
if ( get_user_meta( $user_id, 'wpdbbkp_cloudbackup_notice_dismissed', true ) ) {
return;
}
$nonce = wp_create_nonce( 'wpdbbkp_cloudbackup_notice_dismissed' )
?>
'.esc_html__('Get Started in 2 Minutes.', 'wpdbbkp'). '';?>