WP-Mix

A fresh mix of code snippets and tutorials

Disable WordPress Automatic Updates

In case you haven’t noticed, WordPress auto-updates its core files by default. Neat but not always desired. Here is how to disable auto-updates with a few lines of code.

Rationale

Although WP’s auto updates are real neat, such functionality is not always desired. Like in the dead of night some script is changing stuff on your site with no humans to verify proper results. If something goes awry, it could leave your site down or even vulnerable for who knows how long until someone actually checks in to see what’s up. Avoid this scenario? Yes please. Read on to learn how (without a plugin)..

Disable auto-updates for the WordPress core

Add the following line to your site’s wp-config.php file:

define('WP_AUTO_UPDATE_CORE', false);

Done. No more mindless scripts acting on their own initiative.

Disable auto-updates for WordPress plugins

Add the following line to your site’s wp-config.php file:

add_filter('auto_update_plugin', '__return_false');

Done. Automatic plugin updates now are disabled.

Disable auto-updates for WordPress themes

Add the following line to your site’s wp-config.php file:

add_filter('auto_update_theme', '__return_false');

All done. And remember you can reenable auto-updates anytime by simply removing any of these directives from your configuration file.

Shut them all down

To disable ALL auto-updates with a few lines of code, add the following to your wp-config.php file:

define('WP_AUTO_UPDATE_CORE', false);
add_filter('auto_update_plugin', '__return_false');
add_filter('auto_update_theme', '__return_false');

Boom. All done.

Learn more

Digging Into WordPressWordPress Themes In DepthWizard’s SQL Recipes for WordPress