How to Force WordPress Plugins to Auto-Update

Today’s article will be a really short one but might be useful to some WordPress users.

In WordPress 3.7, WordPress had introduced automatic background updates feature to auto-update minor versions of WordPress core. This feature is enabled by default and users got nothing to do to enable it. Besides for WordPress core, this auto-update feature can also be enabled for plugins.

To auto-update all plugins in your site, you may use auto_update_plugin filter. Simply copy and paste the following snippet into your theme’s functions.php file or even better, site functionality plugin.

1 2 3 4 5
<?php
//* Force auto-updates for WordPress plugins
add_filter( 'auto_update_plugin', '__return_true' );
view raw functions.php hosted with ❤ by GitHub

This feature can be useful and recommended if you’ve a site that you rarely log in and update. This snippet will auto-updates all plugins installed on your site once the newer versions are available.

For more WordPress snippets, don’t forget to subscribe to our RSS and follow us on Twitter and Google+.

Leave a Reply

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