Thursday, 28 November 2013

Disable Auto Updates In WordPress

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.
WordPress 3.7 came out with a new automatic background update feature in an effort to promote better security. By the default, only minor releases and translation file updates are enable. But we could manually disable or enable anything we want.

Just put following codes to your wp-config.php file to disable/enable the updates:

To specifically enable development (nightly) updates, use the following:

add_filter( 'allow_dev_auto_core_updates', '__return_true' );

To specifically disable minor updates, use the following:

add_filter( 'allow_minor_auto_core_updates', '__return_false' );

To specifically enable major updates, use the following:

add_filter( 'allow_major_auto_core_updates', '__return_true' );

Plugins, themes and translation file:

Automatic plugin and theme updates are disabled by default.

To enable automatic updates for plugins, use the following:

add_filter( 'auto_update_plugin', '__return_true' );

To enable automatic updates for themes, use the following:

add_filter( 'auto_update_theme', '__return_true' );

Automatic translation file updates are already enabled by default, the same as minor core updates.  To disable translation file updates, use the following:

add_filter( 'auto_update_translation', '__return_false' );

Core Updates:

To disable all core-type updates only, use the following:

add_filter( 'auto_update_core', '__return_false' );

All Updates

To completely disable all types of automatic updates, core or otherwise, add the following to your wp-config.php file:

define( 'AUTOMATIC_UPDATER_DISABLED', true );

You can also disable all automatic updates using the following filter:

add_filter( 'automatic_updater_disabled', '__return_true' );

Hope this would help you. Source: WordPress Codex
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.