Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Allow WordPress to auto update eveything.
<?php
/*
Plugin Name: Highrise Digital Auto Updater
Plugin URI: https://highrise.digital/
Description: A plugin to set WordPress to auto update everything.
Version: 1.0
License: GPL-2.0+
Author: Highrise Digital
Author URI: https://highrise.digital/
Text domain: highrise-auto-updater
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// allows WP plugins to automatically update.
add_filter( 'auto_update_plugin', '__return_true' );
// allow themes to automatically update.
add_filter( 'auto_update_theme', '__return_true' );
// allow WP core 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.
// force auto updates even for version controlled code environments.
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment