Skip Slow Site Health Tests
Removes the Site Health checks that make HTTP requests back to your own site, which are slow or time out on some hosts.
Opens WPIDE on
Code
// Test names to skip.
$wpide_skip_health_tests = array( 'loopback_requests', 'https_status', 'authorization_header', 'background_updates', 'dotorg_communication', 'page_cache' );
add_filter( 'site_status_tests', function ( $tests ) use ( $wpide_skip_health_tests ) {
foreach ( array( 'direct', 'async' ) as $group ) {
if ( isset( $tests[ $group ] ) ) {
$tests[ $group ] = array_diff_key( $tests[ $group ], array_flip( $wpide_skip_health_tests ) );
}
}
return $tests;
} );
Notes
Skipped tests are simply not shown, so problems they would detect stay hidden.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.