Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Enable Automatic Updates for WordPress Plugins and Themes

Recently, one of our readers asked how they can automatically update WordPress plugins.

Keeping your WordPress plugins up-to-date is crucial for security and performance, but the constant update notifications can be a real headache. Many users find it annoying that they have to update a plugin almost every other day, and we understand the frustration.

In this article, we’ll show you how to enable automatic updates for WordPress plugins, saving you time and effort. We’ll 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 for more details.

The same goes for all plugins and themes installed on your website. You need to install updates for plugins and themes 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 WordPress 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.

How to Automatically Install Updates for Some Plugins in WordPress

WordPress introduced automatic updates for WordPress plugins and themes in WordPress 5.5. This allows you to enable automatic updates for individual WordPress plugins and themes directly from your WordPress dashboard.

Enabling Auto Updates for Individual Plugins

Simply visit the Plugins » Installed Plugins page inside WordPress admin area. Here you’ll see the list of all your installed plugins with a link to ‘Enable auto-updates’ next to each plugin.

Enable automatic updates for WordPress plugins

You need to click on the ‘Enable auto-updates’ link to turn on automatic updates for individual plugins.

Enabling Auto Updates for WordPress Themes

For WordPress themes, you need visit Appearance » Themes and click on the theme you want to automatically update.

This will bring up the theme information pop-up. From here, you can click on the ‘Enable auto-updates’ link to turn on automatic updates for that theme.

Theme auto-updates

That’s all. WordPress will now automatically update these plugins and themes whenever a new version is available. You’ll also get an email notification whenever a new update is installed on your website.

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, a site-specific plugin, or a code snippets plugin.

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:

add_filter( 'auto_update_theme', '__return_true' );

We recommend adding this code using the WPCode plugin. It’s the safest and easiest way to add custom code snippets in WordPress without editing your theme’s functions.php file.

To get started, you need to install and activate the free WPCode plugin. If you need instructions, see this guide on how to install a WordPress plugin.

Once the plugin is activated, go to Code Snippets » Add Snippet from your WordPress dashboard. From there, find the ‘Add Your Custom Code (New Snippet)’ option and click the ‘Use snippet’ button underneath it.

Add a new custom code snippet in WPCode

From there, you need to select ‘PHP Snippet’ as the code type from the list of options that appear on the screen.

Select PHP Snippet as the code type

Next, add a title for your code snippet. This can be anything to help you remember what the code is for.

Then, simply paste the code from above into the ‘Code Preview’ box.

Paste code snippet into WPCode

Finally, toggle the switch from ‘Inactive’ to ‘Active’ and click on the ‘Save Snippet’ button.

Activate and save your custom code snippet

That’s it. If you want to add the second code listed above, simply repeat these steps.

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 the 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 or our picks of the best drag and drop page builders for WordPress.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

41 CommentsLeave a Reply

  1. Dennis Muthomi

    I appreciate your perspective you provided on automatic updates. However, I still prefer to manage plugin and theme updates manually.
    In my experience, automatic updates can sometimes cause compatibility issues that are tricky to identify and troubleshoot when multiple plugins update simultaneously.
    By manually updating plugins one-by-one, I have better control over my site. If an update does cause problems, I know exactly which plugin to rollback :)

  2. Mrteesurez

    When it’s good to have both plugins and theme with the WordPress core to update automatically, it certainly comes with some cons.
    1) If there is a crash, it will be difficult to easily identify the culprit plugin, theme or specific action that triggered the issue.
    2) For me, I used to firstly check the changealog to know the new features coming with the new update, so I can know what functions has added or removed form the plugin.

    I still choose to do it manually.

  3. Moinuddin Waheed

    I prefer doing manual updates to my wordpress websites as it gives a sense of control over the update and also it feels secure not to take risk of crashing the website completely.
    I have heard many times that having updated version is of utmost importance to keep the WordPress safe, is it really the security patch that gets updated always or other factors as well?
    Also, is it advisable to always have the latest version or to have update only when there is security update is concerned?

    • WPBeginner Support

      More than just security is patched when updating a plugin and we recommend keeping plugins and themes up to date as some add helpful new features for your site :)

      Admin

    • Jiří Vaněk

      Plugin updates are either due to discovered security issues or new features added by the developer. Updates are also released because WordPress itself is being updated and evolving, along with its functions and code. As a result, the developer often needs to modify the plugin to ensure it remains compatible with the new version of WordPress. Additionally, a plugin might have a new version because the developer updated it to a new version of PHP, for example. There are many reasons, and it’s a good practice to always keep WordPress, plugins, and themes up-to-date.

  4. Jiří Vaněk

    And what is your specific opinion on automatic updates? Personally, I’ve always found it much better to manage updates manually because it’s possible, and it has often happened to me, that after an update, the website crashed and it took hours or even days before anyone noticed. For that reason, for example, I’ve refrained from automatic updates.

    • WPBeginner Support

      It depends on the specific site, for more complex sites it is normally better to manually update the site but for simple sites automatic updates are normally for the best.

      Admin

      • Jiří Vaněk

        Yes, probably. Personally, I see the benefits of automatic updates mainly in that people who forget about their website still have it up-to-date (until it’s broken by a bad update). You are probably right that for simple websites it makes sense. However, even for medium-sized websites, I would be cautious. Thank you for your opinion.

  5. Madhav Anand

    Nothing worked out please help.

    1. The plugin which is mentioned no longer available to download and use.
    2. On adding code to functions.php it shows “Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.”

    Please update

  6. Sushil Kumar

    You can replace the link for “Automatic Plugin Updates” plugin because it is obsolete now and This plugin was closed on October 2, 2018 and is no longer available for download.

    • WPBeginner Support

      Thank you for letting us know about the plugin being closed :)

      Admin

  7. Roshni

    The auto update plugin is closed for download since Oct 2018. Any substitute?
    Thanks
    Roshni

  8. VBWyrde

    Thanks for this information. I installed the plugins mentioned on my test wordpress site (I want to check out how well it works before applying it to my production site). After Activating the plugin and checking off the one’s I want included in the auto-update… wondering… is there any indicator that the plugins are actually being updated? Or do we just wait and check the site later? Thanks again for your advice on this. Much obliged.

  9. Ahad Arzi

    Hi, first of all thanks for the post. But, Adding that above mentioned auto update plugin code and theme code is recommended? Or It can create any problems in future?

    Please let me know!

  10. Anja

    As a follow up, I’ve since installed the recommended plugin and that didn’t work either. Troubleshooting points to the site being a managed GoDaddy account as the culprit, so if anyone else has the same problem that may be the cause.

  11. Anja

    Hi,

    As a beginner I was wondering where exactly I should put this code? Both examples use line 1, but I’m using a child theme and it needs to enque styles first.

    I’ve put it at the bottom following the CSS rule, but I’m not sure if that would create problems or not? I would really appreciate a response.

    Thanks :)

      • Anja

        Hi,

        This doesn’t seem to have worked as I’m getting a plug-in that needs to be updated. Being a beginner and not knowing PHP I maybe haven’t nested it properly (I haven’t added any nesting at all)?

        My script reads:

        }
        add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );

        add_filter( ‘auto_update_plugin’, ‘__return_true’ );

        add_filter( ‘auto_update_theme’, ‘__return_true’ );

        And it literally ends there. I read on the wordpress codex that lines like this should be added to the wp-config file (which I haven’t done because I have no idea to do it). For educational purposes, why have you chosen functions.php instead?

        Thanks again for your help, and I’m sorry if this is an obvious question.

        • Anja

          Please? I really don’t know what I’ve done wrong, even though further reading did reveal why you’ve added this to functions.php and NOT the codex (as they write not to put it in for these especially).

        • Anja

          Pretty please? As a beginner I really can’t think of what else to do, and this article is targeted at beginners. You need to consider that for every one person who takes the time to say something or ask a question there’s probably about 10 others who’ve just passed on.

        • WPBeginner Support

          Hi Anja,

          We are unsure why the code wouldn’t work for you. Make sure that you are adding it to functions.php file. As an alternate you may want to try Easy Updates Manager plugin which allows you to set automatic updates via admin area.

  12. Devin

    If you edit the functions.php file ….. won’t it just get overwritten by any new wordpress framework updates?

    • WPBeginner Support

      Hey Devin,

      In many cases if you are using a framework, then you are probably also using a child theme. In that case you can add code to child theme’s functions file. Alternatively, you can add your code in a site-specific plugin.

      Admin

  13. Steve

    The WP Rollback plugin has not been updated in 8 months as of 5/16/2017. Do you still recommend it or attest to it’s viability for release 4.7.4 of Wordpress or earlier?
    Thx
    Steve

  14. Panagiotis

    WordPress Codex advises to put this code to wp-config.php what are the pros and cons of putting it to functions.php ?

    • Peter

      No, it says:
      “Do NOT add add_filter() calls directly in wp-config.php. WordPress isn’t fully loaded and can cause conflicts with other applications such as WP-CLI.”

      • Panagiotis

        Ah filters filters filters.
        Got confused because in the codex it gives some definitions as well that should be put in wp-config.php, filters should go on functions.php. Thanks Peter.

  15. Gail Palubiak

    You left out one small item…HOW does a beginner(!) insert this code? A few additional screen shots would have been helpful. Thanks

    • Panagiotis

      Hello Gail,
      you can insert this code by logging in with your ftp credentials to your site and edit functions.php that is located in the /public_html/ folder.

      • Oosman Beekawoo

        There are so many functions.php files in the /public_html/ folder. Which one do I choose?

        There’s one of them in wp-includes, some in a few of my plugin folders and one in each of my theme folders.

        • WPBeginner Support

          Hi Oosman,

          You need to make changes to functions.php file in your currently active theme’s folder.

  16. Carol Parker

    Just handing out compliments – this is absolutely the most useful newsletter I have ever encountered. Your one-topic specific ‘how to’ posts are so well done – easy to understand and solve issues I didn’t know I had! Thank you, thank you, thank you. My blogs are getting more sophisticated by the day as I learn how to accomplish the fine details.

  17. Jason

    Great article! Thanks for publishing it!!

    Just curious, the code snippets for both plugins and themes state the same thing. Is there supposed to be a difference?

    Thanks again!

  18. Shelley Provenza

    Should the 2nd snippet for themes be this?:

    add_filter( ‘auto_update_theme’, ‘__return_true’ );

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.