The following is a code snippet originally posted by Daniel McClure on GitHub as a Gist.
wp-config.php
“`
Original Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Select one or more of the options below to your wp-config.php file to have WordPress updates run automatically. | |
*/ | |
// Apply Major WordPress Updates Automatically | |
define( 'WP_AUTO_UPDATE_CORE', true ); | |
// Apply Minor WordPress Updates Automatically | |
define( 'WP_AUTO_UPDATE_CORE', 'minor' ); | |
// Update *all* WordPress Plugins Automatically – Use with caution as this can have unintended consequences | |
add_filter( 'auto_update_plugin', '__return_true' ); | |
// Update *all* WordPress Themes Automatically – Use with caution as this can delete any changes you have made to your theme | |
add_filter( 'auto_update_theme', '__return_true' ); |
Leave a Reply