MK

Enable auto-updates in WordPress, 4 great options

Remember when auto-updates didn’t exist?

If you’ve been making websites for a long time, you probably remember creating individual pages by hand. Then, you may have progressed to use Server Side Includes (like I did) or PHP to create reusable headers and footers. As content management systems like Joomla! and WordPress were born, you probably threw all of those methods away to enjoy the feature-richness and reusability that CMSs afford. You may have also recognized one glaring problem. Updating CMS code used to be difficult. It wasn’t that the process of updating the code was difficult (it was more difficult than it is now), it was that the reliability of each update was questionable.

Why I’ve decided to enable auto-updates in WordPress

Standards have matured and WordPress developers have put guardrails in place to keep updates from destroying websites. While it’s still theoretically possible to cause a big issue with a plugin update, it’s much less common than it used to be. There are other reasons to feel at ease with auto-updates, too:

  • Rock solid site builders like Elementor and Beaver Builder are so popular, most WordPress developers keep them in mind when updating their code.
  • No-code content beautification via blocks means there’s much less need for custom code that could wreak havoc on updates.
  • Plugin vulnerabilities are often patched before they’re announced. Updating frequently keeps sites more secure.
  • Plugin updates have rarely broken the 10 or so sites I manage. When they do break, they’re easy to fix after receiving a notification from WordPress itself and either disabling and installing the previous package or using WP Rollback to downgrade until the next version.
  • Visual comparison offered by managed hosts like Nexcess provides an added layer of reliability to auto-updates.

For all of these reasons, I’ve finally decided to enable auto-updates for every version of WordPress and every plugin/theme update on every site I manage.

Enabling auto-updates using code

If you’re code-oriented and want to enable auto-updates in WordPress, it’s a pretty straightforward process.

To enable core WordPress updates you can either add code to your wp-config.php file or add a filter to a feature plugin.

To enable auto-updates for core WordPress via wp-config.php, add this line to your file near the other define statements.

define( 'WP_AUTO_UPDATE_CORE', true );

To enable auto-updates for core WordPress via feature plugin, use this line:

add_filter( 'auto_update_core', '__return_true' );

For plugins, add this to your feature plugin:

add_filter( 'auto_update_plugin', '__return_true' );

For themes, add this to your feature plugin:

add_filter( 'auto_update_theme', '__return_true' );

If you’d like to define additional granularity for auto updates, check out the official article for configuring automatic background updates here.

Enabling auto-updates using a plugin

If you’re someone that likes solving problems with plugins, Companion Auto Update is a good option. It’s a simple plugin with powerful notification options. My favorite feature is the ability to send myself a digest of outdated software every so often so I know which plugins aren’t actively being maintained.

Enabling auto-updates individually in WP-ADMIN

Enabling auto-updates individually within WordPress is as simple as point-and-click.

For core updates, navigate to the Updates menu item under Dashboard in the wp-admin area. From there, click on the Enable automatic updates for all new versions of WordPress link.

Individual plugins now have a similar link to the right of their description in the Installed Plugins list. Simply click the Enable auto-updates link next to the plugin you’d like to automatically update.

Want to update your theme automatically? Yep, that’s just as straightforward. Head over to the Appearance menu and click Themes. Then, after clicking the image of your theme, you’ll see a link to enable auto updates.

Enabling auto-updates using regression testing (best)

Alright, so here’s my favorite way to enable auto-updates for WordPress. If you haven’t heard of regression testing, you can learn a little more about it here. Here are the basics:

  • New plugin becomes available.
  • Copy of existing website is created and output of the existing website is captured from multiple different points.
  • New plugin is installed on copy of website.
  • Output of website is captured from the same points as before.
  • System determines if there’s a significant difference in the output.
  • If there’s no significant difference, the plugin is updated on the live site. If there is a significant difference, the plugin is not updated on the live site.

This is the safest way to update plugins because output is checked for changes at all stages before the update is applied to the live site.


As you can see, there are plenty of ways to enable auto-updates for your WordPress site — and for good reason! It’s safer than it has ever been to update your website automatically. So, do you think I’m crazy to leave my fate in the hands of other developers, or are you excited to throw your website on autopilot? Let me know in the comments!

Leave a Reply

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