How to delete the WordPress site health status panel and menu items
This article is about how to delete the health status panel and menu items of a WordPress site. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Delete the WordPress site health status panel and menu items
The WordPress site health feature began in version 5.2. If you do not want to display this thing, you can use the method in this article to delete the WordPress site health panel and menu items and 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 items:
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); Thank you for reading! This is the end of the article on "how to delete the health status panel and menu items of the WordPress site". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!