WordPress

Disable WordPress Version Update Message

Wordpress

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.

<?php
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;" ) );
}
?>
Back to top