# Disable Site Health

> Hides the Site Health screen, its dashboard widget and its menu entry for every user.

- Type: PHP
- Runs: Run everywhere
- Category: [Disable Features](https://wpide.com/library/category/disable-features/)
- Tags: disable, site-health, admin
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-site-health/

## Code

```php
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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Disable Site Health" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
