How To Disable Plugin Update in WordPress?
If you have created your own WordPress theme for your blog and you have installed many different plugins, you are most probably facing with the problem when updating those plugins because once you do that you will change your theme and erase all your previous work/changes you’ve done, By using two codes below you can disable all update for all plugins or only select those who should not be updated.
The first method you can implement will disable all updates to your plugins. Copy and paste below code inside your funtion.php file.
remove_action( ‘load-update-core.php’, ‘wp_update_plugins’ );
add_filter( ‘pre_site_transient_update_plugins’, create_function( ‘$a’, “return null;” ) );
The second code will allow you to choose plugins that should not be updated. Add below code in your function.php file.
For this tutorial I decided to disable Akismet plugin. With below 3 line of the code I mentioned the name of the plugin, folder with the name of the php file that usually has the same name as the folder.
You can duplicate below lines of code and replace necessary values with plugin whos updates you want to block..
function stop_plugin_update( $value ) {
unset( $value->response[‘akismet/akismet.php’] );
return $value;
}
add_filter( ‘site_transient_update_plugins’, ‘stop_plugin_update’ );
How To Disable Plugin Update in WordPress? Read More »