Fix Flywheel (aka WP Engine) Plugin Auto-Updates

[ad_1]

I'm running multiple sites at Flywheel, thought I was going crazy because I have auto-update enabled for Plugins and yet they'd never update at the scheduled cron.

I spoke to support and they first tried to upsell me on their paid "Managed Plugin Updates" add-on but eventually said that if I add this snippet to functions.php, it makes auto-updates work again on their platform:

/* Enable auto-updates of plugins/themes on Flywheel */
add_action(
    'wp_update_plugins',
    function() {
        if (wp_doing_cron() && ! doing_action('wp_maybe_auto_update')) {
            do_action('wp_maybe_auto_update');
        }
    },
    20
);

Hope this helps any other Flywheel users save a few bucks on a native WP feature.

[ad_2]
1 Comment
  1. Thanks for sharing the snippet! I used to add to my sites in the past. Just the aware that auto updates can cause problems, depending on the plugin and the care of the devs.

    The big thing with purchased managed plugin updates are usually using some type of regression tooling to revert plugin updates if it breaks your sites. This is usually more valuable for sites that use stuff like Elementor where things change and you might not expect them.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer