Quantcast
Channel: updraftplus – WordPress.org Forums
Viewing all articles
Browse latest Browse all 1086

Andy on "[Plugin: UpdraftPlus - WordPress Backup and Restoration] wp-cron.php and zip continue running"

$
0
0

Just to sum up the thread for anyone else... I have UpdraftPlus backing up a somewhat large site (lots of pics!). For some reason, it really didn't like some of the default settings, and in addition, I didn't like the lack of control I got with the usage of wp-cron.php. So!

I added the following settings to my wp-config.php just before the "Stop Editing" line:

/**
* Turn off the running of wp-cron.php page based on visits because it sucks
*/
define('DISABLE_WP_CRON', true);

/**
*Tell UpdraftPlus to use a non-binary ZIP
*/
define('UPDRAFTPLUS_NO_BINZIP', true);

The first line turns off wp-cron. I call that page with a real cron job every 15 minutes. The second line tells UpdraftPlus to use a non-binary zip tool (maybe embedded in PHP?).

The next thing I did was create a PHP file in my site's / (root) directory - which is where I run Wordpress from. I called the file runbackup.php, with the following contents:

<?php

define('UPDRAFTPLUS_CONSOLELOG', true);
require_once('wp-load.php');
do_action('updraft_backup_all');

?>

Finally, I created two cron jobs. One runs the wp-cron.php via wget, the other runs the backup every night at 2:40AM:

*/15  *  *  *  *  wget -q -O - http://website.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
40  2  *  *  *  /usr/local/bin/php /home/username/public_html/runbackup.php >/dev/null 2>&1

(obviously, you'll need to replace the website.com and username).

This makes it so the site backs up quickly, and at a repeatable time every day.


Viewing all articles
Browse latest Browse all 1086

Trending Articles