• Resolved adamtoth

    (@adamtoth)


    I’ve been trying to get this plugin to work but can’t seem to get the manual or scheduled backups working.

    My blog is hosted on IIS (Windows) with PHP 5.4.

    I have disabled all other plugins except for UpdraftPlus (I have no caching plugins). When I run the Debug DB backup, it succeeds. When I run the Full Debug backup, it times out (as expected), but does manage to get somewhat through the process.

    However, manual or scheduled backups just don’t do anything. I’ve asked the hosting provider, and they say they do not disable any wp-cron functionality at all, and that they have many wordpress sites that use wp-cron.php successfully.

    I’ve tried hitting wp-cron.php directly, nothing. I’ve turned on WP_DEBUG and don’t see any errors.

    What else can I try here?

    http://wordpress.org/extend/plugins/updraftplus/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author David Anderson

    (@davidanderson)

    You can use the WP-CronTrol plugin to see what events are scheduled. Are any scheduled events at all running?

    Is your WP install behind a username + password? That breaks the scheduler.

    This blog post has a simple plugin to use to test the scheduler: http://ben.lobaugh.net/blog/20787/wordpress-how-to-use-wp-cron

    Thread Starter adamtoth

    (@adamtoth)

    My site is not behind a username/password.

    I installed WP-CronTrol. It lists several standard scheduled events, such as wp_version_check, wp_update_plugins, etc.

    When I click the Backup Now button, a new one-time event is placed, but is never executed. When I click the Run Now link, nothing happens either (although the page says “Successfully executed the cron entry…”.

    At the top of WP-CronTrol page, I get the following error message:

    There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron jobs on your site may not work. The problem was:
    Operation timed out after 3015 milliseconds with 0 bytes received

    I do receive notifications in the UI when there are new WordPress or plugin updates available, so I believe the scheduler is working.

    Plugin Author David Anderson

    (@davidanderson)

    I could be wrong, but I think the updates checks also run synchronously if the cron jobs happen to not be working, so don’t put too much store by that.

    > Operation timed out after 3015 milliseconds with 0 bytes received

    If that shows every time, then I think the most likely case is that your web host is simply mistaken in telling you that there’s nothing blocking the system from working. If you can do some PHP, then upload a simple script that does an HTTP callback to check it out.

    Thread Starter adamtoth

    (@adamtoth)

    Ok, I think I’ve figured out what was going on.

    I believe my hosting provider has disabled loopbacks on my server. If this is the case, then cron jobs in wordpress will fail (the WP-CronTrol plugin will display the message I posted above). To get around this, you can add the following line in wp-config:

    define('ALTERNATE_WP_CRON', true);

    Once I added that, the floodgates opened and my previously scheduled backup jobs ran.

    Thanks!

    Plugin Author David Anderson

    (@davidanderson)

    You’re welcome… if you find UpdraftPlus useful, then please do consider a donation – http://david.dw-perspective.org.uk/donate – or purchase something useful: http://updraftplus.com/

    David

    @adamtoth you saved my day. PBCI Mailer plugin all of sudden stopped dequeing mails. after adding define('ALTERNATE_WP_CRON', true); to wp-config.php, it started working.

    Thanks a ton.

    I can back up the db but when I try the uploads(1.2gb) as well it fails. My host has now confirmed that wp-cron cannot activated on my (shared) server. Does define(‘ALTERNATE_WP_CRON’, true); get round this, if not is there another solution?

    Plugin Author David Anderson

    (@davidanderson)

    Hi gcdavis,

    Yes, that’s what ALTERNATE_WP_CRON is for – where the web host has disabled the proper mechanism.

    However, frankly I’d also move web hosting companies. There are no good reasons to disable the normal mechanism – all the alleged “insecure” things that it enables are also possible in other ways – it prevents nothing, so is fake security that causes customer inconvenience. The real reason web hosting companies do it is to limit resource usage, not for security. Better to find a web hosting company that has enough resources and doesn’t need to place artificial limits.

    David

    Hi David

    We have been working on this site for two months and changing host would be a very much last resort. I thought I had done my homework on their hosting WP but this is one that I (perhaps naively) didn’t anticipate.

    I have added ALTERNATE_WP_CRON but with no effect.

    There is one anomaly that may have a bearing on things, the Last log message time is incorrect, it always show real time minus one hour:
    Total database tables backed up: 19 (Jul 29 12:53:35)
    The time is correct in Active Jobs.

    Having researched WP backup UpdraftPlus appears to be streets ahead of the rest and I would very much like to use it (and of course make a donation). So if you have any other suggestions they would be appreciated.

    Graham

    Plugin Author David Anderson

    (@davidanderson)

    Hi Graham,

    The log message timing isn’t related – the log times are always done in GMT, regardless of time zone settings. That’s because the logs are intended for debugging, and need to be follow a universal standard (i.e. when I’m reading a log file, I don’t want to have to ask the user what time zone they were in before I can interpret it).

    Does your hosting company allow you to set up scheduled tasks via another method? Perhaps in their control panel? If so, then you should set up a task to call /wp-cron.php on your site every 1 minute. (Though it may be that they’ve disabled that too – WP_ALTERNATIVE_CRON is doing something not dissimilar).

    Note that this isn’t just a problem for running UpdraftPlus: if the WP scheduler is disabled then it’ll affect *every* scheduled task of every kind in WordPress (both other backup plugins and any other automated house-keeping done by WP and any other plugins that need to do some) on your site.

    David

    Hi David

    My site sells 83 maps to download, with no blog so most pages and products will not change very often, therefore scheduling is not important to me. I only want to backup when I have made substantial changes and so manual backups suit me fine. Does this help?

    Graham

    Plugin Author David Anderson

    (@davidanderson)

    Hi Graham,

    Not necessarily…. UpdraftPlus always uses the scheduler; if you press “Backup Now” then it schedules a backup for 5 seconds later.

    However, if the site is small then it may be able to completely back up in the amount of time that your web host allows PHP to run, then you can do a backup via going into the “expert” section (at the bottom) and pressing “Debug Full Backup”. That then runs outside the scheduler (that’s the only difference – but it does mean that it needs to complete the backup in a single shot, because the scheduler is needed to resume an incomplete one (which is why “Backup Now” does what it does with the 5-seconds)).

    David

    Hi David

    I can confirm that I was able to do a Debug Full Backup way back when the site only a few images confirming what you have just described. I am on a shared server at present but I could move to a VPS server with 123-Reg (that does activate wp-cron). I can stand the extra cost but the migration freaks me out. Presumably I would have to use WP Export and then Import. Are there any pitfalls that I should be aware of?

    Graham

    Plugin Author David Anderson

    (@davidanderson)

    Hi Graham,

    I believe that the dashboard’s export/import function only copies content, and not settings, so it’s not suitable for making a replica of the site. We sell an add-on for migrations (http://updraftplus.com/shop/migrator/). Alternatively, if you moved to shared hosting on our sister company (http://www.simbahosting.co.uk), then they’d clone the site for you without extra charge (above the hosting, that is).

    David

    Thanks David

    I’ll check out both in the morning.

    Best

    Graham

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Problems with Scheduler’ is closed to new replies.