Skip to content

Instantly share code, notes, and snippets.

@chrisdavidmiles
Created June 12, 2025 23:48
Show Gist options
  • Save chrisdavidmiles/1891277ecaf1e0c1f310cc5bfae26063 to your computer and use it in GitHub Desktop.
Save chrisdavidmiles/1891277ecaf1e0c1f310cc5bfae26063 to your computer and use it in GitHub Desktop.
WordPress Plugin: Enforce Auto Update
<?php
/**
* Plugin Name: Enforce Auto Update
* Description: Enables automatic updates for WordPress core (minor and major stable releases), plugins, and themes.
* Version: 1.0
* Update URI: false
*/
// Enable automatic updates for WordPress core (minor and major stable releases, excluding development releases)
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
add_filter( 'allow_minor_auto_core_updates', '__return_true' );
add_filter( 'allow_major_auto_core_updates', '__return_true' );
// Enable automatic updates for plugins
add_filter( 'auto_update_plugin', '__return_true' );
// Enable automatic updates for themes
add_filter( 'auto_update_theme', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment