Quick Tip: Force Enable Auto-Updates in WordPress

I know that auto-updates are a bit of a (#wpdrama) touchy subject, but I believe in them.

In an mu-plugin I enable all auto-updates like so:

<?php
// Turn on auto-updates for everything
if ( ! defined( 'IS_PRESSABLE' ) || ! IS_PRESSABLE ) {
	add_filter( 'allow_major_auto_core_updates', '__return_true' );
	add_filter( 'allow_minor_auto_core_updates', '__return_true' );
}

add_filter( 'auto_update_core', '__return_true' );
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
add_filter( 'auto_update_translation', '__return_true' );
Code language: HTML, XML (xml)

Other Posts Not Worth Reading

Hey, You!

Like this kind of garbage? Subscribe for more! I post like once a month or so, unless I found something interesting to write about.