3

I use git to deploy my production site, and as a result, the sites Health tool is reporting a critical issue due to the auto-updates not working when a site is under version control.

enter image description here

To be honest, it wouldn't be an issue to allow auto-updates, and just periodically commit the production changes. Is there a way of just forcing them and solving/suppressing this 'critical issue'?

  • Why would you want auto-updates if you have version control? – fuxia Aug 5 '19 at 9:57
  • That's not really my point. It's about why WordPress thinks that having version control warrants disabling auto-updates, and furthermore why the health tool sees that as a critical issue. – Chris J Allen Aug 5 '19 at 10:36
4

There's the site_status_tests filter, to e.g. remove the asynchronous background updates tests:

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

But one could argue that this is just hiding information from the user.

Ticket #46733 suggests instead e.g. "...ignored tests section, hidden away like the Passed tests", so the user can still find this information.

But it's currently closed as maybelater.

One can also create custom tests, through the site_status_tests filter, as explained in the dev notes. Perhabs a custom test wrapper around WP_Site_Health->get_test_background_updates() to modify as needed, but that sounds unstable. Maybe one could look into a wrapper that uses WP_Site_Health_Auto_Updates->run_tests() instead? Though probably best to join the discussion about this on Trac or GitHub to change this.

Update: WordPress 5.3 will change the message from failure to warning (see #47982)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.