QNimate

  • CoursesVideos
  • WP PremiumPlugins
  • DemosLab
  • Home
  • QIdea
  • QTrack
Home Carbon Ads WordPress Enable or Disable Auto Update

WordPress Enable or Disable Auto Update

wordpress-updates

In this tutorial I will explain what WordPress automatic updates are, their types and how to enable or disable automatic updates. Knowing about WordPress automatic updates is necessary if you are running maintaining a WordPress site.

What is WordPress Automatic Updates?

WordPress automatic updates is a feature built into WordPress to update or replace the outdated code files automatically without user permission.

Types of Automatic Updates?

There are four types of Automatic Updates:

  1. Core Updates: Updates for the WordPress core.
    1. Development Updates: Updates from the development version of the site.
    2. Minor Updates: Updates for minor releases. Example: 3.0.1, 3.0.2 etc not 3.0.0, 4.0.0
    3. Major Updates: Updates for major releases. Example: 3.0.0, 4.0.0 etc not 3.0.1, 4.0.1
  2. Plugin Updates: Updates when a new version of plugin is released.
  3. Theme Updates: Updates when a new version of theme is released.
  4. Translation file Updates: Updates when a new translation file is available.

Core updates are further divided into three different types.

By default in WordPress Development updates, Minor updates and Translation file updates are enabled. All other automatic updates are disabled. For all other kinds of updates a message is displayed in dashboard when a update is available.

Disable all Updates

To disable all types of updates place this code in your wp-config.php file.

define( 'AUTOMATIC_UPDATER_DISABLED', true );

If you want to disable all types of via a plugin then use this filter

add_filter( 'automatic_updater_disabled', '__return_true' );

These code will not let any kind of update happen automatically. These code will overwrite all other automatic updates configurations codes shown below.

Enable Major, Minor and Development Updates

To enable all types of core updates place this code in wp-config.php file.

define( 'WP_AUTO_UPDATE_CORE', true );

You can also use this filter

add_filter( 'allow_dev_auto_core_updates', '__return_true' );
add_filter( 'allow_major_auto_core_updates', '__return_true' );
add_filter( 'allow_minor_auto_core_updates', '__return_true' );

To disable all types of core updates change all true’s to false in the above code.

Enable Plugin Updates

To enable automatic plugin updates you need to use this filter

add_filter( 'auto_update_plugin', '__return_true' );

The filter callback is passed with objects holding information about the plugin that will be auto updated. Therefore you can also enable or disable auto update for specific plugins. For example:

function auto_update_specific_plugins ( $update, $item ) {
    if ( $item->slug == 'akismet' ) ) {
        return true; // Always update "akismet" plugin
    } else {
        return $update; // Else, use the normal API response to decide whether to update or not
    }
}
add_filter( 'auto_update_plugin', 'auto_update_specific_plugins', 10, 2 );

Enable Theme Updates

To enable automatic theme updates you need to use this filter

add_filter( 'auto_update_theme', '__return_true' );

The filter callback is passed with objects holding information about the theme that will be auto updated. Therefore you can also enable or disable auto update for specific plugins. For example

function auto_update_specific_themes ( $update, $item ) {
    if ( $item->slug == 'qnimate-theme' ) ) {
        return true; // Always update "qnimate-theme" theme
    } else {
        return $update; // Else, use the normal API response to decide whether to update or not
    }
}
add_filter( 'auto_update_theme', 'auto_update_specific_themes', 10, 2 );

Disable Translation File Updates

To disable translation file updates use this filter

add_filter( 'auto_update_translation', '__return_false' );
Feb 4, 2015Narayan Prusty
"do the harlem shake" effect on any website with JavaScriptEnable, Disable or Limit WordPress Revisions
Comments: 1
  1. Utkarsh Bhatt
    5 years ago

    Doesn’t look like that I need to do this on WP 4.x versions. Right? They already have automatic updates enabled.

    ReplyCancel

Leave a Reply Cancel reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

Narayan Prusty

I am a software engineer specialising in Blockchain, DevOps and Go/JavaScript. This is my personal blog where I write about things that I learn and feel interesting to share.

7 years ago 1 Comment WordPress
Share this
0
GooglePlus
0
Facebook
0
Twitter
0
Linkedin
  • What is WordPress Automatic Updates?
  • Types of Automatic Updates?
  • Disable all Updates
  • Enable Major, Minor and Development Updates
  • Enable Plugin Updates
  • Enable Theme Updates
  • Disable Translation File Updates
Related Articles
  • WordPress Enable Automatic Theme Updates
  • WordPress Enable Automatic Plugin Updates
  • WordPress Disable Automatic Update Emails
  • Attaching Icons to WordPress Theme Menu Items
  • WordPress Frontend Registration And Login Forms
Our Sponsor
My Books

2014 - 2015 © QNimate
All tutorials MIT license