Best Practice to Disable WordPress Update Notification – WordPress Tutorial

By | June 13, 2019

Sometimes, your wordpress will display some update notification for you. It like this:

disable wordpress update notification

However, you do not want to update your wordpress system and do not want wordpress show this notification, how to disable it?

In this tutorial, we will write an example to show how to disable it.

Here is example code:

function remove_core_updates(){
    global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');

Then you copy code above to you theme functions.php and save it.

The effect of this code is:

disable wordpress update notification effect

Leave a Reply

Your email address will not be published. Required fields are marked *