WordPress 5.5 was released with auto-updates! Woot. Well, before you try your hand at update roulette with your favorite plugins, there are some hosts that do not allow them by default.
With Flywheel, the problem is with their cron process. I’ve been in the auto-update business a while, but I can still not explain why three specific cron processes must run “naturally” in order to trigger automatic updates in core.
These three cron processes are:
- wp_version_check
- wp_update_plugins
- wp_update_themes
All of these cron processes run every 12 hours and typically determine when an auto-update should run.
Take a look at this screenshot from the Flywheel cron, for example:
The wp_version_check cron points to nothing. Without this cron process running, automatic updates for themes and plugins will not run as well. Again, I’m not sure why, but they just don’t.
The fix, if you are on Flywheel, is to add this snippet to an mu-plugin or in your child themes’s functions.php.
<?php
/* Enable auto-updates of plugins/themes with cron */
add_action(
'wp_update_plugins',
function() {
if ( wp_doing_cron() && ! doing_action( 'wp_maybe_auto_update' ) ) {
do_action( 'wp_maybe_auto_update' );
}
},
20
);
Code language: PHP (php)
Hopefully that works for you! Cheers.