Member-only story

How to enable WordPress Automatic background updates

How to enable the automatic update of WordPress core, plugins, themes, and translations.

Luca Berton
2 min readNov 14, 2021
https://unsplash.com/photos/-WPrNEM_6dg

Environment

WordPress 3.7+

Issue

Maintain up-to-date Website with WordPress Automatic background updates.

Resolution

Using filters allows for fine-tuned control of WordPress Automatic Updates.

Add the following filters in a must-use plugin — under wp-content/mu-plugins by default:

  • wp-content/mu-plugins/update.php
<?php // mu-plugins/update.php
add_filter( 'allow_dev_auto_core_updates', '__return_false' ); // Enable nightlies (dev updates)
add_filter( 'allow_major_auto_core_updates', '__return_true' ); // Enable major updates
add_filter( 'allow_minor_auto_core_updates', '__return_true' ); // Enable minor updates
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
add_filter( 'auto_update_translation', '__return_true' );
add_filter( 'auto_core_update_send_email', '__return_true' );

Root Cause

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet