How to automatically update WordPress plugins?

Keeping your WordPress core, plugins, and themes updated is one of the most important tasks to protect your site from attacks. Besides, it ensures that the site stays functional and free from bugs and vulnerabilities.

If your site runs on WordPress, you probably have installed a few dozens of useful plugins and themes.

WordPress developers push updates occasionally with new features enhancements, bug fixes, and security patches. If you want to keep your site away from intruders, you should always update your WordPress site.

Not all the developers push their products update at the same time. So, how can you keep your WordPress core, plugins, and themes updated to the latest version?

The answer is simple – enable automatic WordPress update.

In this tutorial, you will learn:

  • The importance to keep your WordPress site updated
  • How to update your WordPress core, plugins and themes automatically
  • How to control the automatic updates settings
  • How to rollback to the previous version after the update

Let’s get to work!

Why Should You Automatically Update WordPress plugins?

Whenever an update is released, there are some bug fixes, new features enhancements, security improvements, and provides better stability and compatibility. So, it is always recommended to update WordPress to the latest version.

When you update your site, the old version is replaced by the new version. It improves your site performance and keeps your website safe and secure. Besides, it allows you to access the new features and provides a better user experience.

According to the Sucuri Website Hack Report 2018, WordPress was the most hacked CMS platform. This doesn’t necessarily mean that WordPress is less secure. The hack was mainly due to the use of outdated CMS and lack of site maintenance.

Keeping your site updated must be your utmost priority. You should always install the updates for WordPress core, themes, and plugins to keep your website safe and stable.

Now that you are aware of the importance of updates, let’s have a look at how you can automatically update WordPress plugins.

Setting up Automatic Update for WordPress plugins

To enable the automatic updates for all your WordPress plugins, you can either modify your theme file functions.php or install a handy plugin. Both of these approaches will update the plugins automatically whenever updates are available.

Let’s see how to do it.

Method 1: Modifying Theme’s functions.php file

You can enable WordPress to automatically update all WordPress plugins by merely adding this code to your theme’s functions.php file.

add_filter( 'auto_update_plugin', '__return_true' );

This filter will tell WordPress automatic updater to install the plugin updates whenever they are available.

If you also want to enable automatic updates for all your installed themes, then you can add the below code in functions.php.

add_filter( 'auto_update_theme', '__return_true' );

Instead of modifying the theme’s functions.php file directly, you can create a WordPress child theme. You can refer our tutorial to create a WordPress child theme. Then you can add the above code in your child theme’s functions.php file.

Method 2: Using a WordPress Plugin

If you don’t want to get your self into the technical stuff, you can use a plugin. There are several WordPress plugins that enable automatic updates. For this tutorial, I will be using the Easy Updates Manager plugin, but you can use any similar plugins.

This plugin offers lots of features and provides more controls over updates. In this plugin, you can:

  • Enable or Disable automatic updates
  • Customize Automatic updates
  • Enable or disable update for each plugin and theme
  • Enable Core Update Notification emails and much more

Let’s begin.

Step 1: Installing and Activating Easy Updates Manager

Easy Updates Manager is available in the WordPress repository so you can directly install it from your dashboard.

From your dashboard, navigate to Plugins > Add New > Search for “easy updates manager”. Once you see it listed in the search result, click on Install Now and then on Activate button.

Installing and Activating Easy Updates Manager

Step 2: Configuring Easy Updates Manager

Once the plugin is activated, go to Dashboard > Updates Options to configure this plugin.

Navigating to Easy Updates Manager Dashboard

Here, you will see different tabs, under which you can set different update settings for your site.

General Tab

Under the General tab, you can find the global settings for managing your updates on your WordPress site.

General Tab

Here you can either disable all updates or configure automatic updates. Under the Automatic updates section, you can enable updates for everything, disable all updates or customize your updates.

Automatic updates section

If you opt for Custom, you get more control over your automatic updates. You’ll be able to Enable or Disable these options:

  • Major WordPress Releases
  • Minor WordPress Releases
  • Development Updates (Core)
  • Translation Updates
  • Automatic Plugin Updates
  • Automatic Theme Updates
Automatic updates settings

Under the Automatic Plugin Updates and Automatic Theme Updates section, you get an option of Select Individually. This option enables you to activate automatic updates for specific plugins and themes.

Automatic Plugin and Theme Updates section

Just below that, you will find the settings to Enable or Disable updates for WordPress core, plugins, themes, and translation.

Additional Updates Settings

If you want to receive an email notification, you can add your emails under the Core Notification e-mails section.

Core Notification Emails Settings

By default, it uses the email address used on your site. You can override it and add multiple emails separated by a comma.

Plugins Tab

In this section, you can individually control the updates for each plugin.

Plugins Tab

To enable automatic updates for a plugin, select Allowed and then On, as shown in the screenshot below.

Enabling Automatic Updates for a plugin

If you have installed lots of plugins, you can use the Bulk option to enable or disable updates for all plugins or selected plugins at once.

Bulk Options for Plugin Updates

Themes Tab

It works in the same way as Plugins. You can individually enable or disable updates for each theme or use the Bulk action to customize multiple themes at once.

Themes Tab

Logs Tab

Under the Logs tab, you will find the log of updates for WordPress core, themes, and plugins. You can see the status of the updates, whether it was automatic or manual and updates date and time.

Logs Tab

To this point, you have successfully configured all the necessary settings in Easy Updates Manager. Now, based on the settings you have set, updates will be done.

How to Rollback to the previous version of Plugin after Update?

Developers test their plugins or themes before releasing an update. However, sometimes, there can be some bugs that can break your site.

Having a backup is handy in such a situation. You can quickly restore your site to the earlier state.

What if you don’t have any backup?

You can still revert the updates for the theme or plugins to the earlier version. At first, you need to find which plugin or theme caused the problem.

To rollback your plugin or theme update, you can install and activate the WP Rollback plugin.

After activation, go to the plugin or theme page from your dashboard. You will see a new Rollback option below each theme/plugin installed on your site.

WP Rollback

Upon clicking on Rollback, you can rollback the plugin/theme to any previous version you want.

Final Thoughts

That’s all! I hope this article helped you learn how to update WordPress plugins, themes, and WordPress core automatically. Keeping your site updated is crucial to keep your website safe and provides a better user experience to your readers. Besides, you get added benefits of performance improvement, new features, and security enhancements.

What’re your thoughts on this? Do you plan to update WordPress plugins automatically? Please feel free to let me know if you have any questions or face any issues in the comment section below. I would love to hear from you.

Leave a Reply