Home>Article>CMS Tutorial> How to Remove WordPress Site Health Status Panel and Menu Items
The following columnWordPress Tutorialwill introduce to you how to delete the WordPress site health status panel and menu items. I hope it will be helpful to friends in need!
Delete WordPress site health status panel and menu items
The WordPress site health function started in version 5.2, if you don’t want to display this thing , you can use the method in this article to delete the WordPress site health status panel and menu items, add the following code to the current theme function template functions.php:
Delete the site health status panel:
add_action( 'admin_menu', 'remove_site_health_menu' ); function remove_site_health_menu(){ remove_submenu_page( 'tools.php','site-health.php' ); }
Delete Site Health menu item:
add_action( 'admin_menu', 'remove_site_health_menu' ); function remove_site_health_menu(){ remove_submenu_page( 'tools.php','site-health.php' ); }
Disable site health email notifications:
add_filter( 'wp_fatal_error_handler_enabled', '__return_false' );
Or add the following code to the configuration file wp-config.php:
define( 'WP_DISABLE_FATAL_ERROR_HANDLING', true );
Above This method does not prevent site health functions from running secretly in the background
The above is the detailed content of How to Remove WordPress Site Health Status Panel and Menu Items. For more information, please follow other related articles on the PHP Chinese website!