Hide the WordPress update notifications from all users except administrators
Between minor and major releases, WordPress is regularly updated with new features, improvements on existing ones, security fixes and more. If you have automatic updates enabled on your site, minor releases are downloaded and installed silently without requiring any action from the site’s administrator. However this is not the case for major releases. Once a major release is out a prompt will appear in the WordPress dashboard letting you know that there is a new major update available for your site urging you to install it.
This notification might be annoying in some cases. For example if you are a developer managing many client sites. Depending on the amount of custom work on each site, or the plugins installed, you will often, if not always, need to first do the update on a staging server to see if everything works as it should, before pushing the update to the live site. This process might take some time which means that clients/users might see this update notification and start asking why are you not doing your job keeping their site up to date, and if you manage many sites, answering questions like this one might take up precious time away from the actual update process. In order to avoid this problem we’re going to create a small plugin that hides the update notification from all users except ones with administrator privileges.
Create a new folder under the
wp-content/plugins folder of your installation and name it
hide-update-notification or something similar. Inside it create a file called
hide-update-notification.php or something similar. Inside the file paste this code.
Save the file and activate the plugin from your WordPress dashboard.
The core update notification is now hidden from all user roles, except the administrator one. Hopefully you found this guide useful. Have you got any ideas on topics you’d like to see discussed on our blog? Let us know in the comments below.