Enable Auto-Updates on Flywheel on WordPress 5.5

woman in black top using MacBook
Photo by Christina @ wocintechchat.com on Unsplash

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:

Flywheel cron process
Flywheel Cron Processes

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.

Ronald Huereca
Ronald Huereca

Ronald Huereca

Ronald has been part of the WordPress community since 2006, starting off writing and eventually diving into WordPress plugin development and writing tutorials and opinionated pieces.

No stranger to controversy and opinionated takes on tough topics, Ronald writes honestly when he covers a topic.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ronald Huereca
MediaRon - Ronald Huereca

Ronald created MediaRon in 2011 and has more than fifteen years of releasing free and paid WordPress plugins.

Quick Links

Say Hi