Skip to content

Instantly share code, notes, and snippets.

@danielmcclure
Created December 4, 2018 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielmcclure/8d1299b6647088dd68b4c79a4e60b6f0 to your computer and use it in GitHub Desktop.
Save danielmcclure/8d1299b6647088dd68b4c79a4e60b6f0 to your computer and use it in GitHub Desktop.
Run WordPress Updates, WordPress Plugin Updates, and WordPress Theme Updates Automatically
<?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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment