• Resolved ineedquestionsanswered

    (@ineedquestionsanswered)


    Is there a feature I can set that will automatically update all WordPress and plugin updates without having to do them manually?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Farhad

    (@farhadvn)

    Yes you can do that by 2 stage…
    First: add the code to wp-config.php
    define( 'WP_AUTO_UPDATE_CORE', true );

    Next, there is 3 ways…
    1.plugins
    Such as WP Auto Updater
    2.functions.php
    By adding some simple codes in theme functions
    3.mu-plugins
    i use this method, create a php file in wp-content/mu-plugins directory, with any name you like, add the code and save it, it just work, remember add <?php before code & ?> After it.

    Here is code with comment

    //Auto update
    add_filter( 'allow_dev_auto_core_updates', '__return_false' );           // disable development updates
    add_filter( 'allow_minor_auto_core_updates', '__return_true' );         // Enable minor updates
    add_filter( 'allow_major_auto_core_updates', '__return_true' );         // Enable major updates
    add_filter( 'auto_update_plugin', '__return_true' );
    add_filter( 'auto_update_theme', '__return_true' );
    add_filter( 'auto_update_translation', '__return_true' );

    You can delete first line (dev) bcs it is disabled by default.

    If you want disable a update as translate for example, simple change true to false

    Thread Starter ineedquestionsanswered

    (@ineedquestionsanswered)

    I added these codes on:

    add_filter( ‘auto_update_plugin’, ‘__return_true’ );

    and

    add_filter( ‘auto_update_theme’, ‘__return_true’ );

    as seen here: https://imgur.com/3BbZbc3

    But they still don’t update any plugins or whenever WordPress has a new release, meaning I still get the notification to have to manually update them. Did I placed the codes in the wrong section? Or perhaps I did not configured them correctly?

    Farhad

    (@farhadvn)

    @ineedquestionsanswered your codes is only for plugin & themes, do you deactived wp cron?
    I say my method that work ok, mean now in use in my website.

    Please remember for update wordpress add this code to wp config file:

    define( 'WP_AUTO_UPDATE_CORE', true );

    And this codes to functions:

    add_filter( 'allow_minor_auto_core_updates', '__return_true' );         // Enable minor updates
    add_filter( 'allow_major_auto_core_updates', '__return_true' );         // Enable major updates
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I automate all updates?’ is closed to new replies.