Skip to content

Instantly share code, notes, and snippets.

@damianwajer
Last active August 29, 2015 14:08
Show Gist options
  • Save damianwajer/b3ff6b837f9e441e2df2 to your computer and use it in GitHub Desktop.
Save damianwajer/b3ff6b837f9e441e2df2 to your computer and use it in GitHub Desktop.
[WordPress] Automatic Background Updates for WordPress core, plugins and themes.
<?php
/**
* WordPress Automatic Background Updates
*
* @link http://codex.wordpress.org/Configuring_Automatic_Background_Updates
* @link http://www.sitepoint.com/a-guide-to-updating-wordpress/
*/
// disable automatic updates
add_filter( 'automatic_updater_disabled', '__return_true' );
// disable automatic minor updates
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
// enable automatic major updates
add_filter( 'allow_major_auto_core_updates', '__return_true' );
// enable development updates
add_filter( 'allow_dev_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