Ever since WordPress 3.7, WordPress has provided the option to update certain files automatically. By default, only some updates install automatically, but others can be automatically installed if you change a few settings. If you’d rather not have to hassle with updating WordPress, plugins, and themes manually, read on to find out how to configure other WordPress automatic updates. Be aware that some of these changes require changing or writing code in WordPress files and you should proceed with caution if you’re not familiar with PHP.
Types of updates
WordPress has 4 types of updates.
- Core updates — This is an update to the WordPress software itself. Minor core updates (version numbers with 3 numbers, like, the current version of WordPress — 4.8.2) generally only provide security and maintenance fixes. Major core updates (version numbers with 2 numbers, like the upcoming WordPress 4.9) provide new features and other changes. Minor core updates are installed automatically by default, but major core updates are not.
- Plugin updates — This is an update provided by the creator of a plugin. Plugin files downloaded through the WordPress Dashboard can be updated through WordPress.
- Theme updates — This is an update provided by the creator of a theme. Like plugin files, theme files downloaded through the WordPress Dashboard can be updated through WordPress.
- Translation file updates — WordPress has a powerful translation feature called Localization. Updates to these files are installed automatically by default.
Changing default settings
Default settings are either altered with a change to the
wp-config.php file or by creating a plugin.
To change which core updates are installed automatically, you’ll need to make a change to your
wp-config.php file. To do so, you’ll either need FTP access to your site or you’ll want to use your hosting provider’s tools to make direct changes to your site’s files. Be sure to back up your files before making any changes to WordPress core files.
wp-config.php and look for the line with
WP_AUTO_UPDATE_CORE. Based on the updates you want, change the line to the following:
- All updates (major, minor, and development updates) enabled:
define ( 'WP_AUTO_UPDATE_CORE', true );
- All updates (major, minor, and development updates) disabled:
define ( 'WP_AUTO_UPDATE_CORE', false );
- Only minor updates enabled (default setting):
define ( 'WP_AUTO_UPDATE_CORE', minor );
Plugin and theme updates
Plugin and theme updates cannot be changed through
wp-config.php. Instead, add the following code to your theme’s
- Enable automatic updates for all themes:
add_filter( 'auto_update_theme', '__return_true' );
- Enable automatic updates for all plugins:
add_filter( 'auto_update_plugin', '__return_true' );
If you want these settings to remain even if you change themes, you’ll need to create a Must-Use Plugin and place the code in it. No matter which route you take, remember to backup your files before making changes to WordPress files.
If you’re interested in changing these settings but you don’t feel comfortable making changes to your site’s code, contact us and we’ll be happy to set things up exactly how you want them.
Was this tip helpful? Subscribe to receive more!
Get our free WordPress tips delivered to your inbox once a week with MPWR Monday, our weekly email list. You’ll receive one email every Monday with a new WordPress tip.
You’ll also receive our Latest Post Redirect plugin for WordPress when you sign up! Latest Post Redirect allows you to use a shortcode to redirect a post or page to your latest blog post. Use it to keep an link to your latest work that automatically updates when you create new content.