WordPress Security

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

Learn how to code with Treehouse

  • Learn projects with access to 1000+ videos
  • Practice live with our Code Challenge Engine
  • Get help in our members-only forums

Start with a 7 day free trial