With the release of 3.7, WordPress now has the ability to update itself in the background, requiring no action for site admins. Overall, we love this new feature, but there are many reasons you might want to disable background updates. WordPress provides several filters to customize these updates, including ways to completely disable them, enable them for plugins & themes and include/exclude development & major versions. Let’s take a look at the options.
NOTE: There are some cases where background updates won’t work, regardless of the filters you use.
- If you’re using version control like SVN or Git
- If you are required to enter FTP credentials when installing themes and/or plugins, hinting at problems with file permissions
- If your hosting company has chosen not to support background updates (WP Engine is one such company)
To check if your site supports background updates, see the image below.
Background Update Tester Plugin
The WordPress team has released the Background Update Tester plugin that will check if your site is able to receive background updates, and if not, will provide more information as to the reason. You can provide this information to a web developer or hosting company, and they might be able to help you enable automatic background updates.
Once the plugin is installed & activated, navigate to “Dashboard” > “Update Tester” to view the results.
4 Types of WordPress Updates
There are 4 different types of updates you can configure:
- Core updates – Files responsible for powering the WordPress core, found in the root directory of your install, as well as
/wp-admin/
&/wp-includes/
folders. - Plugin updates – All the plugins you currently have installed, found in the
/wp-content/plugins/
folder. - Theme updates – All the themes you currently have installed, found in the
/wp-content/themes/
folder. - Translation file updates – All translation files you currently have installed, found in with
/wp-content/languages/
or/wp-includes/languages/
.
Before we get into configuring each type, let’s review the default configuration for background updates.
Default Configuration for WordPress Auto-Updates
Update Type | Default Configuration |
---|---|
Minor core updates (3.7 to 3.7.1) | Enabled |
Major core updates (3.7 to 3.8) | Disabled |
Core development updates (aka: “bleeding edge”) | Disabled |
Translation file updates | Enabled |
Theme updates | Disabled |
Plugin updates | Disabled |
Now we’ll go over how to change these values.
I highly recommend creating a custom plugin to add any of the following filters to your site. If you place them in your theme’s functions.php
file, and then change themes, your configurations will no longer work.
Completely Disable ALL WordPress Background Updates
Background updates help keep your site up-to-date & secure. Disabling them is strongly discouraged.
This will disable all automatic updates (core, translation, theme & plugin). You will still be able to update WordPress by going to “Dashboard” > “Updates”, and manually clicking the “Update Now” button.
Add this line to your wp-config.php
file:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
If you don’t have access to your wp-config.php file, you can place the following code into your functions.php
file, or into a custom plugin.
add_filter( 'automatic_updater_disabled', '__return_true' );
WordPress recommends you utilize BOTH of these methods, although I’m not really sure why. I’d recommend the wp-config.php
method.
Disable Only WordPress Core Updates
This will disable all core-type updates, but still allow other types.
Add the following line to your functions.php
file, or a custom plugin:
add_filter( 'auto_update_core', '__return_false' );
Disable Only Translation File Updates
Add the following line to your functions.php
file, or a custom plugin:
add_filter( 'auto_update_translation', '__return_false' );
Enable WordPress Theme Updates
Automatic theme updates will only work with themes hosted in the WordPress Theme Repository. If you purchased a theme from a third-party & installed it by uploading a .zip
file, automatic theme updates might not work.
Add the following line to your functions.php
file, or a custom plugin:
add_filter( 'auto_update_plugin', '__return_true' );
Enable WordPress Plugin Updates
Automatic plugin updates will only work with plugins hosted in the WordPress Plugin Repository. If you purchased a plugin from a third-party & installed it by uploading a .zip
file, automatic plugin updates might not work.
Add the following line to your functions.php
file, or a custom plugin:
add_filter( 'auto_update_theme', '__return_true' );
Enable or Disable WordPress Core Updates
You can use a constant in your wp-config.php
file to further configure auto-updates. Some of this is repetitive to some of the filters above, but it could also produce different results.
define( 'WP_AUTO_UPDATE_CORE', true );
– This will enable all auto-updates to core (minor, major & development releases)define( 'WP_AUTO_UPDATE_CORE', false );
– This will disable all auto-updates to core (minor, major & development releases). I recommend using this method over the filter mentioned above.define( 'WP_AUTO_UPDATE_CORE', minor );
– This produces the exact result of WordPress’ default behavior. In most cases, it should not be necessary. This only auto-updates minor core releases (3.7 to 3.7.1).
If you want more fine-tuned control over enabling & disabling individual types within the core set of updates, you can use the following filters (in a custom plugin or functions.php
file).
Enable/Disable Core Development Updates
- ENABLE –
add_filter( 'allow_dev_auto_core_updates', '__return_true' );
- DISABLE –
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
Enable/Disable Core Minor Updates
- ENABLE –
add_filter( 'allow_minor_auto_core_updates', '__return_true' );
- DISABLE –
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
Enable/Disable Core Major Updates
- ENABLE –
add_filter( 'allow_major_auto_core_updates', '__return_true' );
- DISABLE –
add_filter( 'allow_major_auto_core_updates', '__return_false' );
We Recommend
https://kinsta.com › wordpress-hosting
Fast and secure infrastructure, worldwide CDN, edge caching, 35 data centers, and enterprise-level features included in all plans. Free site migrations.
https://gravityforms.com › features
Create custom web forms to capture leads, collect payments, automate your workflows, and build your business online. All without ever leaving WordPress.
Leave a Comment