• Resolved ariban99

    (@ariban99)


    Hi
    is there a way to set a time (like 2am) to auto update wordpress and also all plugins? right now it randomly updates in middle of the day and users are complaining they get the under maintenance during shopping and that is NOT good

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try adding this to your wp-config.php file:

    // Stop auto-updating in the middle of the day; update between 2:00 AM to 6:00 AM instead.
    $updates_suspended = (date('Hi') < 0200 || date('Hi') > 0600);
    
    define( 'AUTOMATIC_UPDATER_DISABLED', $updates_suspended );

    Schedule WordPress Auto-Updates to only run during business hours

    Alternatively, try the WP Auto Updater plugin.

    Thread Starter ariban99

    (@ariban99)

    wow, thank you, this is great!

    You’re welcome. ??

    Please mark as resolved.

    Thread Starter ariban99

    (@ariban99)

    setting as solved, but just a quick update!
    the snippet code stops wordpress from auto updating unless its in those hours, however wordpress still tries to update outside of those hours and because its not allowed, it then pushes it off again and again but it doesnt actually force the updates to run during those hours only. it simply stops auto updating if its NOT in those hours set.
    so i cant use those snippet code, not what i am looking for. i install the third party plugin and that does the job!

    • This reply was modified 2 years, 7 months ago by ariban99.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘set time to autoupdate’ is closed to new replies.