Opened 9 years ago
Closed 3 years ago
#37347 closed feature request (wontfix)
Add a filter to disable maintenance mode for all updates, everywhere.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5.3 |
Component: | Upgrade/Install | Keywords: | has-patch close |
Focuses: | ui, administration | Cc: |
Description
Currently there is no way for plugins to disable the wordpress maintenance mode from happening during updates done via the standard WP_Upgrader class.
I would like something like
add_filter( 'maintenance_mode', '__return_false' );
to just work. Which would completely stop WP_Upgrader::maintenance_mode from creating the .maintenance file.
The use case is for plugins that hook into the upgrade process, like https://wordpress.org/plugins/wp-safe-updates/ that want to either disable the maintenance phase, or replace it with something different.
Attachments (1)
Change History (7)
This ticket was mentioned in Slack in #feature-shinyupdates by anttiviljami. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by anttiviljami. View the logs.
9 years ago
#5
in reply to:
↑ description
@
3 years ago
- Keywords close added
- Milestone set to Awaiting Review
#6
@
3 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
I agree with @desrosj on this.
The maintenance mode functionality is designed to provide some safety for a majority of the sites while they are going through updates. For the minority of sites that want to do something different, it is best done outside of the regular WordPress context.
Discussion can always continue on closed tickets and it can be reopened in the future should conditions change.
My apologies that it took so long to receive a reply, @Zuige!
Marking a few other tickets related to maintenance mode: #36960, #36960
I'm generally pro-filter/action hook, but I'm not sure this is something that Core should allow.
Maintenance mode is only enabled when an active plugin/theme or Core itself is updated. Unless there is an issue encountered during the upgrade, it's only displayed very briefly. Allowing plugins and themes to modify this behavior or replace it with something more complex could potentially compromise the confidence site owners have in the upgrade process, which is especially important now that a UI exists for site owners to opt-in to plugin and theme auto-updates.
It looks like the
enable_maintenance_mode
filter was added within #34936 to serve a similar purpose without preventing the.maintenance
file from being created, but it appears to have been purposefully introduced in a way that plugins could not use it (apply_filters()
is not yet available).I'm going to mark this with a
close
suggestion. But if you're able to provide a bit more detail for a use case to replace this it may help justify.