Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Ulrich

    (@grapplerulrich)

    I have been able to get the update to run if I add do_action( 'wp_maybe_auto_update' ); to the header.php of my theme and then view the site.

    I got the idea from nacin.
    https://make.www.ads-software.com/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7/#comment-10935

    I added do_action( 'wp_schedule_update_checks' ); to the header too and after a few days the site had still not updated. I imagine the issue is there but I am unsure how to test it.

    Sounds like maybe cron isn’t working, then. Background Update Tester doesn’t currently check for that.

    Check out https://www.ads-software.com/plugins/wp-crontrol/ which (according to the readme) will let you know if your cron is failing. If it is, there’s an alternative method you could use: https://codex.www.ads-software.com/Editing_wp-config.php#Alternative_Cron.

    Thread Starter Ulrich

    (@grapplerulrich)

    I thought it was the cron but could not find a way to confirm it. I switched to the ALTERNATE_WP_CRON and it the cron should run in 11 hours.

    I did contact my host about this and they asked which cron jobs should they allow. What should I tell them?

    Thank you for your help.

    Thread Starter Ulrich

    (@grapplerulrich)

    The ALTERNATE_WP_CRON worked! ??

    One way to confirm it:
    * Schedule a post to publish in five minutes.
    * Visit the front-end of your site six minutes later.
    * Go to the dashboard. Did the post publish, or does it say “Missed schedule”?

    Or use the Crontrol plugin, which seems to check.

    WordPress doesn’t use an actual cron job. It uses what’s called a loopback HTTP request. Basically, on a normal pageload, if it finds are events that need to be run, it does an HTTP request back to itself to run these events in its own process. That way, the page can continue to load for the visitor, and the scheduled events can separately get handled (they may take some time, depending).

    Alternate cron works by redirecting the visitor back to the same page they requested, then uses the original process to run the events. It’s a little lame/weird, but it’s better than it not working.

    If you’re not running multisite, I’m pretty sure you can also set up a proper cron job (to run every one or five minutes or whatever) to run php /path/to/wp-cron.php, where that’s the wp-cron.php file in the root directory. (You could also use curl instead to hit that file with its public URL, but if the standard WP cron doesn’t work, then the server can’t do these kinds of loopback requests.)

    Being unable to do a loopback request is largely considered a poor configuration. They should probably make sure cron works well on their servers, especially if they host a lot of WordPress sites.

    ciuly

    (@ciuly)

    @andrew
    would you please peek at my similar issue here; https://www.ads-software.com/support/topic/automatic-background-updates-cant-them-them-to-work

    I’d like to attempt to find the root cause and fix that instead of using alternate wp cron.

    this is running on my personal server so I have full control over things.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No background updates’ is closed to new replies.