How to Automatically Update WordPress Plugins
Hey everyone, today’s post is all about automatically update WordPress plugins. Depending on the plugins you use, there is normally an update or two that drops quite regularly. This is an important step to improve the security and remove any bugs that may have been in the previous version, but it can be annoying to have to update plugins every time you log in.
It does depend on your personal view, I prefer to control the updates and install them myself, and know what they are updating them for, but then I am a bit of a control freak. It is totally up to you how you run your WordPress site.
When & Why Would You Should Automatically Update WordPress Plugins
If there is a major security update or big change from WordPress themselves, your WordPress version may automatically update. But most major updates will need to be manually updated, and this will be visible when you log-in to your WordPress editor.
How to Set up Automatic Updates for All WordPress Plugins
If you wish to set all of your WordPress Plugins to automatically update, then there is a command you can add to your theme.php file or a site-specific plugin. See below.
All plugins –
add_filter( ‘auto_update_plugin’, ‘__return_true’ );
You can also add a command that will keep your WordPress theme up-to-date too.
Update your theme.
add_filter( ‘auto_update_theme’, ‘__return_true’ );
I would add caution with this one, that if an update does go wrong, it has already installed, so you will still need to log in regularly to check that the update hasn’t gone wrong.
How to Set Up Automatic Updates for Some WordPress Plugins
Setting up updates with major WordPress plugins with high trust ratings can be beneficial, but if you use plugins made by smaller developers, it may not be a good thing.
So, this way may be the way to go, with a plugin called Automatic Plugins Updates you can choose which plugins you will allow to be automatically updated and those that you would rather manage yourself. Check out this post to learn how to install a WordPress plugin.
Note – if you are using this plugin, you will not need to add that command to your theme.php file.
Once installed, you can go into the settings and select which plugins you would prefer not to automatically update.
There May Be a Need to Undo an Automatic Update
Even manually updating a WordPress plugin may result in problems arising, that is why I suggest 2 things.
- Manually back up your WordPress Site once a week, check out how here
- Install a Plugin called WordPress Rollback Plugin.
If you ever have a problem with your site, you can restore it from a back-up. But with this plugin you can just rollback a version of a plugin. Some would suggest uninstalling the plugin and reinstalling it, but that would just install the latest version and that may have been the problem version.
With Rollback, when you go to your plugin lists, there will be a new option there, which allows you to roll back the version of the plugin to the previous version.
Hope you found that useful, if you have any questions or comments please leave them below.