Paul Underwood
PaulundSoftware Engineer

Disable Wordpress Version Update Message

Every couple of months Wordpress will release a new version of Wordpress which improves on the previous version. You should always keep your Wordpress version up to date as it will fix problems on the previous version. But updating your Wordpress version can cause problems, if any of your plugins are using old functions then they will no longer work on the new version. For this reason you always need to test and backup your site when you update your Wordpress version. For this reason it's a good idea to make sure only the admin user can update your Wordpress version. Add the following in your functions.php file to make sure only the admin user can update Wordpress.

if ( !current_user_can('administrator') ) {
    add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
    add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );