WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 5 days ago

#48850 assigned feature request

Plugins Screen: introduce "Automatic updates" column / option

Reported by: jeherve Owned by: audrasjb
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.7
Component: Plugins Keywords: 2nd-opinion has-patch needs-testing has-screenshots needs-design-feedback
Focuses: administration Cc:
PR Number:

Description

WordPress 3.7 introduced us to automatic updates for Core, themes, plugins, and translations. It also brought us filters like auto_update_plugin that allow site owners to automatically update specific plugins if they want to.
WordPress 5.1 went a step further with Fatal Error Protection, and 5.2 made managing any failures caused by broken plugins even easier with Recovery Mode.

At this point, I think it has become relatively safe for a site owner to use the auto_update_plugin filter to enable autoupdates for any or all of their plugins. It removes one of the burdens of site management, and in case of failure (such as a plugin introducing a fatal error with an update) it is relatively easy to access the dashboard and remove the plugin.

All that said, I would like to suggest making plugin autoupdates even more mainstream by adding a new column to the Plugins screen, where one could toggle autoupdates on / off for just about any plugin.

Attachments (15)

plugin-autoupdates-wp-admin.png (590.7 KB) - added by jeherve 7 weeks ago.
New Automatic update field in the Plugins screen
autoupdate-1-selector.png (231.0 KB) - added by audrasjb 3 weeks ago.
Autoupdate - 1 - selector
autoupdate-2-bulk-edit.png (189.6 KB) - added by audrasjb 3 weeks ago.
Autoupdate - 2 - bulk edit
48850.diff (5.4 KB) - added by audrasjb 3 weeks ago.
Add plugin autoupdate management in bulk edit selector - first workaround
48850.1.diff (5.3 KB) - added by audrasjb 2 weeks ago.
Move the "Automatic update activated" text in the plugin description column and add a dashicon
Capture d’écran 2020-01-05 à 00.34.35.png (160.0 KB) - added by audrasjb 2 weeks ago.
48850.1.diff screenshot
48850.2.diff (7.8 KB) - added by xkon 12 days ago.
auto update list
auto-update-list.jpg (125.8 KB) - added by xkon 12 days ago.
48850.2.diff screenshot
Capture d’écran 2020-01-12 à 15.03.25.png (107.2 KB) - added by audrasjb 9 days ago.
Add autoupdate information to update-core.php screen.
48850.3.diff (9.0 KB) - added by audrasjb 9 days ago.
Add autoupdate information to update-core.php screen.
automatic-update-scheduled-screen-update-plugins.png (84.9 KB) - added by audrasjb 9 days ago.
Plugins update screen: add time until the next scheduled update for plugins that have an available update.
automatic-update-scheduled-screen-update-core.png (61.4 KB) - added by audrasjb 9 days ago.
update-core.php screen: add time until the next scheduled update for plugins that have an available update.
48850.4.diff (11.2 KB) - added by audrasjb 9 days ago.
Adds time before the next scheduled update in both update.php (plugins screen) and update-core.php (updates screen).
48850.5.diff.png (170.9 KB) - added by audrasjb 5 days ago.
48850.5.diff : Replace Activate/Deactivate with Enable/Disable and add Enable/Disable Autoupdate action for each plugin in Plugins screen
48850.5.diff (13.6 KB) - added by audrasjb 5 days ago.
Replace Activate/Deactivate with Enable/Disable and add Enable/Disable Autoupdate action for each plugin in Plugins screen

Download all attachments as: .zip

Change History (34)

@jeherve
7 weeks ago

New Automatic update field in the Plugins screen

This ticket was mentioned in Slack in #core by noisysocks. View the logs.


5 weeks ago

#2 @paaljoachim
5 weeks ago

That is a very good way of adding auto updates for plugins! As one could then select the plugins that are most stable for auto updating.

I have earlier made this issue: #45783

It basically adds an auto updates section to the existing Dashboard -> Updates screen.

Last edited 3 weeks ago by SergeyBiryukov (previous) (diff)

#3 @audrasjb
3 weeks ago

Hi there,

I really love the proposed approach but I'd like to propose another way to handle this feature: as a very first step for allowing auto update management in WordPress Admin, we could also use the bulk edit selector.

Screenshot and patch (first workaround) coming below ⏬

@audrasjb
3 weeks ago

Autoupdate - 1 - selector

@audrasjb
3 weeks ago

Autoupdate - 2 - bulk edit

@audrasjb
3 weeks ago

Add plugin autoupdate management in bulk edit selector - first workaround

#4 @audrasjb
3 weeks ago

  • Keywords has-patch needs-testing has-screenshots needs-design added

In 48850.diff, as a first workaround and a proof of concept:

  • Allow admins to enable/disable automatic updates by using the plugins bulk selector.
  • Display admin notices when enabling/disabling auto updates on existing plugins.
  • Display a text to show that selected plugins are now updating automatically.
  • Store auto updated plugins in a site option.
  • Make basic controls on the user’s capabilities

The nice point is that we don't add another column to the plugin table list, and the patch is pretty simple. It doesn't need AJAX and it doesn't add a lot of code to the existing codebase. But it will of course need some improvement: it's the first time I try to play with updates/autoupdates so I guess some parts of this patch are probably _doing_it_wrong ;-)

When testing this patch/workaround, please don't forget autoupdates are not running immediately (but twice a day, I believe).

Also adding needs-design keyword as I guess it would be nice to add a dashicon or better wording/visual indications here and there :)

Cheers,
Jb

@audrasjb
2 weeks ago

Move the "Automatic update activated" text in the plugin description column and add a dashicon

@audrasjb
2 weeks ago

48850.1.diff screenshot

#5 @audrasjb
2 weeks ago

  • Keywords needs-design-feedback added; needs-design removed

In 48850.1.diff, I moved the text in the plugin description column and I added a dashicon.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


13 days ago

#7 @afragen
13 days ago

FWIW I like this second approach better. There is more space available in this location.

I haven't tested the patch but in a quick look there needs to be a the third parameter for in_array( needle, haystack, true ).

#8 @xkon
12 days ago

The Capture d’écran 2020-01-05 à 00.34.35.png looks really nice and clean without making a major change on the screen but I think that we also need a way to "sort" the auto-updated plugins as well similar to the Active / Inactive statuses.

Unfortunately on sites with a lot of plugins the list will eventually become a bit hectic to go through 1 by 1 trying to read a small message to see which plugin has auto-updates on or off.

Since this screen never used any type of sorting on the table itself we can follow the current convention and add 2 extra sorting links for "Auto-Updates On"/"Auto-Updates Off" (I'm not sure about the wording at all by the way :D ).

Any thoughts on this?

@xkon
12 days ago

auto update list

@xkon
12 days ago

48850.2.diff screenshot

#9 @xkon
12 days ago

48850.2.diff adds the strict in_array comparisons as @afragen mentioned and adjusts some minor CS fixes.

As well as introduces the 2 extra lists as "Auto updates on" "Auto updates off" as mentioned in my previous comment (8) for an easier test/look.

#10 @audrasjb
10 days ago

Thanks @xkon, yes I think it's worth adding these 2 filters, this is a nice enhancement for sure!

@audrasjb
9 days ago

Add autoupdate information to update-core.php screen.

@audrasjb
9 days ago

Add autoupdate information to update-core.php screen.

#11 @audrasjb
9 days ago

In 48850.3.diff:

  • Add autoupdate information to update-core.php screen (see screenshot above).

#12 @audrasjb
9 days ago

  • Owner set to audrasjb
  • Status changed from new to assigned

@audrasjb
9 days ago

Plugins update screen: add time until the next scheduled update for plugins that have an available update.

@audrasjb
9 days ago

update-core.php screen: add time until the next scheduled update for plugins that have an available update.

#13 @audrasjb
9 days ago

In the last two screenshots (see above), I added the time until the system will perform the autoupdate.
Patch proposal coming later today.

@audrasjb
9 days ago

Adds time before the next scheduled update in both update.php (plugins screen) and update-core.php (updates screen).

#14 @audrasjb
6 days ago

Related: #49199

(same for themes)

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


6 days ago

#16 @nrqsnchz
6 days ago

I suggest changing from "Automatic update activated" to "Automatic update enabled" (or something similar) to avoid confusion with the "Activate/Deactivate" link below the plugin's name. The fact that both places use the verb "Activate" might make some users think that these two are related actions/labels.

Related to me previous point, is the "Bulk actions" dropdown the only place where I can activate/deactivate automatic updates for a plugin? I think that also having this setting near the label would make it more obvious, at least when one wants to make a change to just one plugin.

Last edited 6 days ago by nrqsnchz (previous) (diff)

This ticket was mentioned in Slack in #core by francina. View the logs.


6 days ago

@audrasjb
5 days ago

48850.5.diff : Replace Activate/Deactivate with Enable/Disable and add Enable/Disable Autoupdate action for each plugin in Plugins screen

@audrasjb
5 days ago

Replace Activate/Deactivate with Enable/Disable and add Enable/Disable Autoupdate action for each plugin in Plugins screen

#18 @audrasjb
5 days ago

Thanks for your feedback @nrqsnchz, that totally makes sense to me.

In 48850.5.diff:

  • Replace Activate/Deactivate with Enable/Disable
  • Add individual Enable/Disable actions for each plugin

See also the related screenshot shared right above.

#19 @nrqsnchz
5 days ago

@audrasjb Looks great! 👍

Note: See TracTickets for help on using tickets.