Disable Automatic Updates

his code snippet allows you to disable the automatic updates of WordPress core, plugins, and themes.

  1. add_filter( 'auto_update_core', '__return_false' ); – This line disables automatic updates for the WordPress core.
  2. add_filter( 'auto_update_plugin', '__return_false' ); – This line disables automatic updates for all plugins.
  3. add_filter( 'auto_update_theme', '__return_false' ); – This line disables automatic updates for all themes.

It’s important to note that while disabling automatic updates can be useful in certain situations (for instance, when you want to ensure changes from an update don’t break your site), it also means you will need to manually handle updates for your site to get new features, improvements, and security fixes. It’s crucial to have a regular update process in place to keep your WordPress site secure and functioning optimally if automatic updates are disabled.

PHP
// Disable core auto-updates
add_filter( 'auto_update_core', '__return_false' );
// Disable auto-updates for plugins.
add_filter( 'auto_update_plugin', '__return_false' );
// Disable auto-updates for themes.
add_filter( 'auto_update_theme', '__return_false' );