Created
May 22, 2024 07:47
-
-
Save PAPAMICA/7da55859ad542bede97f28b8952114af to your computer and use it in GitHub Desktop.
Snippet for Wordpress : disable check in Site health check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # root@worker-websites > grep "public function get_test" class-wp-site-health.php | awk '{print $3}' | sed 's/^get_test_\(.*\)()$/\1/' | |
| # wordpress_version | |
| # plugin_version | |
| # theme_version | |
| # php_version | |
| # php_extensions | |
| # php_default_timezone | |
| # php_sessions | |
| # sql_server | |
| # utf8mb4_support | |
| # dotorg_communication | |
| # is_in_debug_mode | |
| # https_status | |
| # ssl_support | |
| # scheduled_events | |
| # background_updates | |
| # plugin_theme_auto_updates | |
| # available_updates_disk_space | |
| # update_temp_backup_writable | |
| # loopback_requests | |
| # http_requests | |
| # rest_availability | |
| # file_uploads | |
| # authorization_header | |
| # page_cache | |
| # persistent_object_cache | |
| function disable_object_cache_check( $tests ) { | |
| unset( $tests['direct']['persistent_object_cache'] ); | |
| return $tests; | |
| } | |
| add_filter( 'site_status_tests', 'disable_object_cache_check' ); | |
| function disable_sql_server( $tests ) { | |
| unset( $tests['direct']['sql_server'] ); | |
| return $tests; | |
| } | |
| add_filter( 'site_status_tests', 'disable_sql_server' ); | |
| function disable_plugin_version( $tests ) { | |
| unset( $tests['direct']['plugin_version'] ); | |
| return $tests; | |
| } | |
| add_filter( 'site_status_tests', 'disable_plugin_version' ); | |
| function disable_theme_version( $tests ) { | |
| unset( $tests['direct']['theme_version'] ); | |
| return $tests; | |
| } | |
| add_filter( 'site_status_tests', 'disable_theme_version' ); | |
| function disable_plugin_theme_auto_updates( $tests ) { | |
| unset( $tests['direct']['plugin_theme_auto_updates'] ); | |
| return $tests; | |
| } | |
| add_filter( 'site_status_tests', 'disable_plugin_theme_auto_updates' ); | |
| function disable_page_cache( $tests ) { | |
| unset( $tests['async']['page_cache'] ); | |
| return $tests; | |
| } | |
| add_filter( 'site_status_tests', 'disable_page_cache' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment