How long does it take for theme / plugin automatic updates to initiate?

WordPress will check twice a day ( 12 hours ). This time can drift because WordPress doesn’t use traditional server cronjobs but cheap cronjobs which rely on user actions to trigger them such as viewing a page. So it could be 13 hours for when the updates are trigger but it still won’t run automatically, someone has to “trip the switch” so to speak by visiting your website.

It’s not the most reliable way but it does the job well enough. Here’s one of 3 similar functions:

/**
 * Determines whether core should be updated.
 * wp-includes/updates.php
 * Line 632 
 *
 * @since 2.8.0
 *
 * @global string $wp_version
 */
function _maybe_update_core() {
    // include an unmodified $wp_version
    include( ABSPATH . WPINC . '/version.php' );
    $current = get_site_transient( 'update_core' );
    if ( isset( $current->last_checked, $current->version_checked ) &&
            12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) &&
            $current->version_checked == $wp_version ) {
            return;
    }
    wp_version_check();
}

Leave a Comment