WordPress regularly releases updates with new features and bug fixes. It is advised to update asap, so monitoring your website for new WordPress updates is critical to ensure your website is fully patched against potential attacks. Automatic background updates were introduced in WordPress 3.7 in an effort to promote better security, and to streamline the update experience overall. By default, only minor releases – such as for maintenance and security purposes – and translation file updates are enabled on most sites. In special cases, plugins and themes may be updated.
In WordPress, there are four types of automatic background updates:
- Core updates
- Plugin updates
- Theme updates
- Translation file updates
Core updates are subdivided into three types:
- Core development updates, known as the “bleeding edge”
- Minor core updates, such as maintenance and security releases
- Major core release updates
By default, every site has automatic updates enabled for minor core releases and translation files.
Automatic updates can be configured using one of two methods: defining constants in wp-config.php, or adding filters using a Plugin.
Configuration via wp-config.php
Using wp-config.php, automatic updates can be disabled completely, and core updates can be disabled or configured based on update type.
Constant to Disable All WordPress Updates
The core developers made a conscious decision to enable automatic updates for minor releases and translation files out of the box. Going forward, this will be one of the best ways to guarantee your site stays up to date and secure and, as such, disabling these updates is strongly discouraged.
To completely disable all types of automatic updates, core or otherwise, add the following to your wp-config.php file:
define( 'AUTOMATIC_UPDATER_DISABLED', true );
Constant to Configure Core WordPress Updates
To enable automatic updates for major releases or development purposes, the place to start is with the WP_AUTO_UPDATE_CORE constant. Defining this constant one of three ways allows you to blanket-enable, or blanket-disable several types of core updates at once.
define( 'WP_AUTO_UPDATE_CORE', false );
WP_AUTO_UPDATE_CORE can be defined with one of three values, each producing a different behavior:
- Value of true – Development, minor, and major updates are all enabled
- Value of false – Development, minor, and major updates are all disabled
- Value of 'minor' – Minor updates are enabled, development, and major updates are disabled
Note that only sites already running a development version will receive development updates. For other sites, setting WP_AUTO_UPDATE_CORE to true will mean that it will only get minor and major updates.
For development sites, the default value of WP_AUTO_UPDATE_CORE is true. For other sites sites, the default value of WP_AUTO_UPDATE_CORE is minor.
How to check for WordPress Updates
- Add the IP addresses of the Nagios servers that need access to the Allowed array in check_wordpress_updates.php”
- Put check_wordpress_updates.php in the root of you WordPress installation”
- Put check_wordpress_updates.sh in you Nagios plugin folder and call it from Nagios interface”
The result should look like this: