Disable Site Health
Hides the Site Health screen, its dashboard widget and its menu entry for every user.
Opens WPIDE on
Code
add_filter( 'map_meta_cap', function ( $caps, $cap ) {
if ( 'view_site_health_checks' === $cap ) {
$caps[] = 'do_not_allow';
}
return $caps;
}, 10, 2 );
add_action( 'wp_dashboard_setup', function () {
remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal' );
}, 99 );
Notes
The weekly background check still runs; only the screens are removed.
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.