Skip to content

Instantly share code, notes, and snippets.

@salcode
Last active November 29, 2021 10:08
Show Gist options
  • Select an option

  • Save salcode/b60df55598c21c5970600a56715a2b1c to your computer and use it in GitHub Desktop.

Select an option

Save salcode/b60df55598c21c5970600a56715a2b1c to your computer and use it in GitHub Desktop.
By default, WordPress only automates minor versions of core when there is no VCS information present. This code enables auto-updates for everything (core, plugins, and themes).
<?php
/**
* Enable Auto Updates for Everything
* https://gist.github.com/salcode/b60df55598c21c5970600a56715a2b1c
*
* Please put this file in the `mu-plugins` directory.
*
* curl -O https://gist.githubusercontent.com/salcode/b60df55598c21c5970600a56715a2b1c/raw/wp-auto-update-everything.php
*/
// Enable all core-type updates.
add_filter( 'auto_update_core', '__return_true' );
// Enable automatic updates even if a VCS folder (.git, .hg, .svn etc) was found in the WordPress directory or any parent.
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );
// Enable automatic updates for all plugins.
add_filter( 'auto_update_plugin', '__return_true' );
// Enable automatic updates for all 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