If you are running an older version of WordPress, you may want to consider disabling plugin updates in WordPress. It will prevent WordPress from automatically updating your plugins, potentially breaking your site.
Additionally, suppose you are using a custom plugin or theme. Disabling plugin updates will ensure that your customization are not overwritten by a newer version of the plugin or theme.
Reasons to Disable Plugin Update
There are a few reasons you might want to disable plugin updates in WordPress. Maybe you’re running an older version of WordPress and can’t update because you’re on shared hosting.
Maybe you’re developing a plugin and don’t want users to update to a beta version accidentally. Or maybe you don’t like the idea of WordPress auto-updating plugins on your site. Here are some of the common reasons for disabling Plugin updates:
- Security: By disabling plugin updates, you can prevent potential vulnerabilities in your site.
- Compatibility: If a plugin update is incompatible with your WordPress version, it can break your site.
- Performance: Plugin updates can sometimes slow down your site.
- Cost: If you are using a paid plugin, updating it can be expensive.
- Simplicity: If you are happy with how a plugin works, it does not need to be updated and potentially complicate things.
Disable Specific Plugin Update Code Snippet
This code snippet allows you to disable plugin updates for all plugins or specific plugins. It can be helpful if you don’t want specific plugins to be auto-updated for whatever reason.
/**
* Prevent update notification for plugin
* Place at bottom in theme functions.php
*/
function disable_plugin_updates( $value ) {
$pluginsToDisable = [
'plugin-folder/plugin.php',
'plugin-folder2/plugin2.php'
];
if ( isset($value) && is_object($value) ) {
foreach ($pluginsToDisable as $plugin) {
if ( isset( $value->response[$plugin] ) ) {
unset( $value->response[$plugin] );
}
}
}
return $value;
}
add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
You can use the code snippet shared above to disable plugin updates for a single plugin or multiple plugins. To disable updates for a single plugin, add the code snippet to the functions.php file of your WordPress theme. For multiple plugins, change the names of the plugin folder and the main plugin file in the respective code snippets.
If you cannot edit functions.php or not using a child theme, I suggest you use “Code Snippets” plugins.
Disable WordPress Update Notifications using code
WordPress is a popular content management system that helps you easily create and manage your website or blog. However, one downside of WordPress is that it constantly displays nags, or notifications, about available updates for your plugins and themes.
If you find this update nags annoying, you can use a plugin or theme to disable them. Doing so will help you keep your WordPress site up-to-date without being constantly bombarded with notifications.
Disable WordPress Core Update Nag:
/**
* Disable WordPress Update nag
* Place at bottom in theme functions.php
*/
add_action('after_setup_theme','remove_core_updates');
function remove_core_updates()
{
if(! current_user_can('update_core')){return;}
add_action('init', create_function('$a',"remove_action( 'init', 'wp_version_check' );"),2);
add_filter('pre_option_update_core','__return_null');
add_filter('pre_site_transient_update_core','__return_null');
}
Disable WordPress Plugin Update Notifications:
/**
* Disable Plugin Update Notifications
* Place at bottom in theme functions.php
*/
remove_action('load-update-core.php','wp_update_plugins');
add_filter('pre_site_transient_update_plugins','__return_null');
Disable all WordPress Nags & Notifications:
/**
* Disable all the Nags & Notifications
*/
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');
Disable WordPress Update Notifications & Nags using Plugin
If you’re using WordPress, you’ve probably seen the update notifications in the admin area from time to time. These notifications can be annoying, especially if you’re not planning to update your WordPress installation soon.
Here are some of the most popular plugins to disable WordPress Notification.
- Disable WordPress Update Notifications and auto-update Email Notifications
- Disable WP Notification
- Hide Updates
- Disable Updatesz
- Hide Dashboard Notifications
Once installed and activated, the plugin will disable all WordPress update notifications and nags. You can still manually update WordPress if you want, but you’ll no longer be bugged about it.
If you’re not a fan of plugins, you can also accomplish this by adding a few lines of code to your wp-config.php file. Just add the following:
With either method, you can rest easy knowing that you won’t be bothered by WordPress updates anymore.
Conclusion
I always suggest keeping your WordPress themes and plugins updated. Because, If you want your WordPress site to stay secure and perform well, you need to keep your themes and plugins updated. New versions of WordPress are released regularly, and each new version includes security fixes and performance improvements. Keeping your site up to date ensures that you benefit from these improvements and helps keep your site secure.
After completing the steps, you will no longer receive any update notifications or nags from WordPress. All of these methods should work fine for most people.
Leave a Reply