The auto-update feature was introduced in WordPress 5.5. It works for all themes and plugins. Disabling this feature can give more control over the updates, the manual update allows creating a backup before the update and checking if everything looks and works as it should right after an update.
Method 1: From the WordPress Dashboard:
Go to Appearance > Themes.
Click on the theme you want to disable auto-updates for.
You should see a "Disable auto-updates" button, click it to disable auto-updates for that theme. If you see "Enable auto-updates" - it means that the auto-update is already disabled.
Method 2: Using PHP Code in Child Theme
Note: This method requires a child theme to be installed and active. The child theme can be created using this tutorial.
The auto-update can be disabled using PHP code, in this case, the button to enable auto-update won't be active. To do this, add this code to the child theme functions.php file:
add_filter( 'auto_update_theme', '__return_false' );
To hide the button completely, this code can be added:
add_filter( 'themes_auto_update_enabled', '__return_false' );
Disabling Auto-Updates for Plugins:
Go to Plugins > Installed Plugins.
Find the plugin you want to disable auto-updates for.
On the right side, click the "Disable auto-updates" button. If you see "Enable auto-updates" - it means that auto-update is already disabled.
Using PHP Code in a Child Theme to disable Auto-Updates for Plugins
Note: This method requires a child theme to be installed and active. The child theme can be created using this tutorial.
This code can disable the auto-updates for plugins, add the code to your child theme's functions.php
file:
add_filter( 'auto_update_plugin', '__return_false' );
This PHP code can be added to functions.php to hide the auto-update button:
add_filter( 'plugins_auto_update_enabled', '__return_false' );