Disable automatic plugin updates in WordPress 5.5 which will be released in August 2020.
Snippet Type
Execute on Child Sites
Snippet
add_filter( 'plugins_auto_update_enabled', '__return_false' );
add_filter( 'themes_auto_update_enabled', '__return_false' );
2 Likes
Existing constants have been removed but there should be a filter to disable in the UI.
WordPress:master
← WordPress:fix/remove-feature-constants
opened 04:52PM - 06 May 20 UTC
Let's remove the previously introduced constants.
> After few discussions, it… was also decided to remove the feature’s constants. Indeed, constants are used in WordPress core for specific cases:
>
> - Very early use, before WP is loaded
> - For use mostly by hosting companies/low level settings
> - Mostly for things that are really “constant” (never change)
For reference, [see the following meeting recap](https://make.wordpress.org/core/2020/05/06/auto-updates-feature-meeting-summary-may-4-2020/).
Fixes #110
adz1111
(Adam Helman)
May 7, 2020, 3:33pm
4
Hi - does that mean the add_filter you supplied won’t work after all?
…and - just as an aside, for something like this (or other things like this) is there an easy way via mainWP to update a bunch of sites’ function.php files with similar code in one go (albeit very carefully)?
The constant was the method used before but the filter method will work. I would recommend to use the code snippets extension instead of dealing with updating the functions.php
file on a bunch of active child themes sites.
All of the filters and examples will be published on HelpHub soon enough related to the auto updates for plugins and themes.
opened 03:28AM - 25 Mar 20 UTC
documentation
task
_Migrated from: https://github.com/audrasjb/wp-autoupdates/issues/71
Previously… opened by: @jeffpaul
Original description:_
>We'll want to ensure that ahead of any submission to merge this plugin into WordPress core that we've sufficiently documented within the plugin code and within the markdown/text files in this plugin. Assuming there is a feature plugin merge proposal for this plugin, we'll want to ensure we capture items that should be included in the WordPress Core HelpHub documentation site as well.
You can find the full history in this post.
There should be a constant that can be defined in the sites wp-config.php file to disable the automatic plugin updates.
define( 'WP_DISABLE_PLUGINS_AUTO_UPDATE', true );
adz1111
(Adam Helman)
May 10, 2020, 5:21pm
8
Ok thanks - so that constant you first mentioned has been changed then? That’s all I was looking for confirmation of (and if so, I appreciate it may well change again when 5.5 is released)
1 Like
Correct the PHP constants have been removed but the filters options will be staying.
Will make sure that the code snippets related to auto plugins and themes gets updated closer to the release of WordPress 5.5 in August 2020.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
Looks like a constant was added back for being able to disable all updates.
define( 'AUTOMATIC_UPDATER_DISABLED', true );
The correct filter names is updated in the post now.
add_filter( 'plugins_auto_update_enabled', '__return_false' );
add_filter( 'themes_auto_update_enabled', '__return_false' );
1 Like