How to Disable Automatic Updates in WordPress?

Are you aware that WordPress can automatically update your website? Sometimes even themes and plugins too.

With the release of WordPress 3.7, WordPress introduced automatic update features. It allowed WordPress to automatically install new minor updates in your WordPress website.

Though it is recommended to enable automatic updates in WordPress, still there is a slight chance that these background changes may result in breaking your website.

So, if you choose to do manual updates and disable automatic updates in WordPress, use the below methods to achieve it.


Methods to Disable Automatic Updates in WordPress

There are two ways to disable the automatic updates in WordPress –

1. Disable All Updates via Filter

You can use the following WordPress filter to disable all automatic updates including minor and major versions.

php
/**
 * Disable Automatic Updates via a WordPress Core Filter
 */
add_filter( 'automatic_updater_disabled', '__return_true' );

2. Disable Individual Updates via Filter

If you wish to disable specific auto-updates in WordPress, you can use individual filters to disable WordPress core updates, theme updates, and plugin updates by using the code snippet below.

php
// Disable auto-updates for WordPress core
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');

3. Disable All Types of Core Automatic Updates via ‘wp-config.php’

To completely disable all types of automatic updates including, WordPress core, themes, and plugins, add the following code snippet to your ‘wp-config.php‘ file:

php
/**
 * Disable Automatic Updates via 'wp-config.php
 */
define('AUTOMATIC_UPDATER_DISABLED', true);

4. Disable Core Updates Based on Minor and Major Versions

Use the following code snippet to disable the core updates based on their version type.

php
# Disables all core updates:
define( 'WP_AUTO_UPDATE_CORE', false );
 
# Enables all core updates, including minor and major:
define( 'WP_AUTO_UPDATE_CORE', true );
 
# Enables core updates for minor releases (default):
define( 'WP_AUTO_UPDATE_CORE', 'minor' );

Leave a Reply

Your email address will not be published. Required fields are marked *