Cara setting Automatic Updates for WordPress Plugins

Cara setting Automatic Updates for WordPress Plugins
Recently one of our readers asked how they can automatically update WordPress plugins. Many users find it annoying that almost every other day they have to update a plugin. In this article, we will show you how to enable automatic updates for WordPress plugins. We will also show you how to exclude some plugins from automatic updates.
How to Enable Automatic Updates for WordPress Plugins

When and Why You Should Automatically Update WordPress Plugins?

By default WordPress can automatically update itself when a security or minor release is available. For major releases, you have to initiate the update yourself. You also have to install plugin and theme updates yourself.
Keeping your WordPress site updated is crucial for security and stability of your site. See our guide on why you should always use the latest version of WordPress.
Same goes for all plugins and themes installed on your website. You need to install updates for themes and plugins to get new features and fixes.
However, you may have noticed that some of them are updated more frequently than others. A lot of popular plugins are updated almost weekly.
WordPress updates
Some users find it a bit distracting, that whenever they login there is an update available for one or more plugins.
What if you could allow trusted developers to auto-update plugins similar to WordPress.
Let’s take a look at how you can automatically update plugins in WordPress.

Setting up Automatic Update for All WordPress Plugins

You can set WordPress to automatically install all plugin updates by simply adding this code to your theme’s functions.php file or a site-specific plugin.
1
add_filter( 'auto_update_plugin', '__return_true' );
This filter tells WordPress automatic updater to automatically install plugin updates when they’re available.
If you also want to automatically update your themes, then you can add another code like this:
1
add_filter( 'auto_update_theme', '__return_true' );

How to Automatically Install Updates for Some Plugins in WordPress

If there are a few plugins that are updated more frequently, then you may want to just enable automatic updates for those plugins.
Another situation is when you don’t want to update specific plugins.
Here is how you can include or exclude plugins from automatic updates.
First thing you need to do is install and activate the Automatic Plugin Updatesplugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon installation, you need to visit Settings » Automatic Plugin Updatespage to configure plugin settings.
Exclude plugins from automatic update
You can select the plugins you don’t want to automatically update. You can also enable email notifications for Automatic updates. Once you are done, click on the save changes button to store your settings.
That’s all, the plugin will now automatically update all plugins except for the ones you have excluded.
Note If you are using this plugin, then you don’t need to use the previous method of adding auto_update_plugin filter.

How to Rollback to a Previous Version of Plugin After Update?

Plugin or theme incompatibilities can cause trouble for your website. Even though most good developers thoroughly test their plugins, there are always rare bugs that can cause your site to break.
The first step you should take to protect your website is to install a WordPress backup solution.
However, restoring your WordPress site from a backup seems like a lot of work. If you know what plugin or theme update caused the problem, then it would be easier to just rollback the update.
Here is how you can easily rollback plugin or theme updates. Simply install and activate the WP Rollback plugin.
Upon activation, go back to plugins page on your WordPress site. You will notice a new Rollback option below each plugin installed on your site.
Rollback plugin's to previous versions
Clicking on Rollback will allow you to rollback your plugin to any previous version you want. It can also rollback theme updates. For more detailed instructions see our guide on how to rollback WordPress plugins.
We hope this article helped you setup automatic updates for plugins in WordPress. You may also want to see our guide on how to enable automatic updates in WordPress for major releases.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

0 Response to "Cara setting Automatic Updates for WordPress Plugins"

Post a Comment