Home > CMS Tutorial > WordPress > How to Remove WordPress Site Health Status Panel and Menu Items

How to Remove WordPress Site Health Status Panel and Menu Items

藏色散人
Release: 2021-01-28 17:32:06
forward
2461 people have browsed it

The following column WordPress Tutorial will 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!

How to Remove WordPress Site Health Status Panel and Menu Items

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' ); 
}
Copy after login
Copy after login

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' ); 
}
Copy after login
Copy after login

Disable site health email notifications:

add_filter( 'wp_fatal_error_handler_enabled', '__return_false' );
Copy after login

Or add the following code to the configuration file wp-config.php:

define( 'WP_DISABLE_FATAL_ERROR_HANDLING', true );
Copy after login

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!

Related labels:
source:zmingcx.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template