documentation icon indicating copy to clipboard operation
documentation copied to clipboard

WordPress and Drupal Core Updates Doc Update

Open joe-westcott opened this issue 1 year ago • 0 comments

Re: WordPress and Drupal Core Updates

Priority: Medium

Issue Description:

On Pantheon, the WordPress Site Health Status shows one critical issue:

Background updates are not working as expected

Within the details of this problem, the first line is this:

The WP_AUTO_UPDATE_CORE constant is defined as false

This constant is set within Pantheon's upstream. It make sense that this WP_AUTO_UPDATE_CORE constant should be set to false, but the error message is a problem.

Suggested Resolution

It's possible for Pantheon to suppress the error message without causing other unwanted behavior.

A solution such as the following code will remove the background updates test and also remove the disk space test from Site Health checks, because both tests will fail by default on Pantheon-hosted environments.

The end result is that this code will suppress these Site Health error messages, which affect all Pantheon customer environments.

add_filter(‘site_status_tests’, function (array $test_type) {
    unset($test_type[‘async’][‘background_updates’]); // Suppresses false positive “critical issue” error, regarding background updates on Pantheon
    unset($test_type[‘direct’][‘available_updates_disk_space’]); // Suppresses Pantheon disk space error / test on hosted environments
  return $test_type;
}, 10, 1);

In support ticket 851028, Abul Kashem advised me to share this code workaround here, as a documentation issue.

joe-westcott avatar Nov 03 '23 19:11 joe-westcott