Site Health reports critical issue when disabling auto updates

Sorry if that has been asked before. I am using the Code Snippets extension to disable auto updates, with the snippets provided here Disable automatic plugins and themes auto-updates in WordPress 5.5

The “issue” is that WP Site Health is reporting this as a critical issue. I understand of course why that is but maybe a client would see that as an issue. Any way around this, or am I missing something?

1 Like

Hi @Liquidambient

One of the recommendations of Site Health is to have automatic updates enabled.

So when you disable them with the filter, regardless of whether you use Code Snippets or not, the Site Health raises an issue.

Unfortunately, MainWP doesn’t support hiding that Site Health issue on the child site.

The automatic updates provided by MainWP offer more flexibility and, thus, stability when compared to the stock WP automatic updates, so if a client brings up the Site Health issue, perhaps that advantage can be communicated to them.

2 Likes

I’m using the same code snippets via a must-use-plugin, but that should work the same way. Additionally I have the following rule and I don’t see warnings in site health, so it might be the key for you as well:

/** Disable the possibility to enable automatic updates for WP core (WP 5.6) */
add_filter( 'allow_major_auto_core_updates', '__return_false' );
2 Likes

@josklever I think I came across your solution with the mu plugin, just thought for simplicity sake I use the code snippets. To be honest, not sure if that was the best idea as atm I am still confused as where the filters get added. I was looking for them in the wp-admin/ functions.php and the theme functions.php and can not find them.
While researching the topic I came across another post from a wp plugin where a user suggest to the dev to add

add_filter( 'site_status_tests', function( $tests ) {
	unset( $tests['async']['background_updates'] );
	return $tests;
});

I believe this relates to
define('AUTOMATIC_UPDATER_DISABLED', true);
in the config.php, yet this also could be a solution. The things is that I am not sure of where if would add that above filter. Maybe you would have an idea?

1 Like

I’m using the mu-plugin route so I can manage it a little better for a large number of sites. But it should work the same.
I think the snippets are stored in and loaded from the database, as long as you use the correct option “Execute on Child Sites”.
The snippet you mention specifically for the site health section is new to me, so I haven’t used that.

1 Like

They are stored in the database and for them to be triggered, the MainWP Child plugin has to be active.

1 Like

Ok, sorry, that of course makes sense. Would there be a way to reset / remove those added filters via the code snippets extension? Or would they need to be deleted manually in the database?

That’s described here in the documentation:

2 Likes

Thank you @josklever I swear, usually I am the one complaining about those who don’t read the instructions :see_no_evil::pray:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.