Updating themes and plugins automatically

I want my plugins and themes to be updated automatically but I am unable to do it.

This guide says that you have to add

Read More
add_filter( 'auto_update_plugin', '__return_true' );

to the code, but I don’t know where exactly should I add it. The guide also suggests to put it into mu-plugins but I have no idea how.

Can you please help?

Related posts

2 comments

  1. 1. Updating WordPress core:

    If you want the WordPress auto updates to handle major core updates too, you will have to add a single configuration line. To do this, open the wp-config.php file in the root folder of your WordPress installation and add this line to it:

    define('WP_AUTO_UPDATE_CORE', true);
    

    2. Updating WordPress plugins:

    If you want your plugins to be automatically updated by WordPress when a new version is released, you need to add a line to your wp-config.php file, similar to the one above. This time, however, a filter is used for enabling the plugin auto updates:

    add_filter( 'auto_update_plugin', '__return_true' );
    

    3. Updating WordPress themes:

    If you want WordPress to handle themes updates you need another line added to the wp-config.php file:

    add_filter( 'auto_update_theme', '__return_true' );
    

    If you are getting problem like this – Do not add add_filter() calls in wp-config.php – causes conflicts with WP-CLI and possibly other problems. Then should have to put these filters into mu-plugins

  2. You can add this code to functions.php file in your theme folder, so use FTP to add this line to wp-contemt/themes/YOUR-THEME-NAME/functions.php

Comments are closed.