[wp-trac] [WordPress Trac] #51857: Add rollback for failed plugin/theme updates

WordPress Trac noreply at wordpress.org
Tue Apr 25 00:29:27 UTC 2023


#51857: Add rollback for failed plugin/theme updates
-------------------------------------------------+-------------------------
 Reporter:  pbiron                               |       Owner:  pbiron
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Upgrade/Install                      |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info has-patch needs-    |     Focuses:
  dev-note needs-testing                         |
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Following up on the discussions in Slack:

 The recently added `move_dir()` is a lot faster than `copy_dir()`, and
 makes rollbacks possible. However `move_dir()` may fall back to
 `copy_dir()` in some rare cases. Been wondering how to handle this edge
 case.

 For now it seems a good option would be to provide means for the users to
 retry a plugin or theme update without first creating a rollback backup.
 This could be achieved by not making backups when the users update by
 uploading a .zip file. This workaround will let anybody to fall back to
 the previous update code relatively easily.

 It will also need a good explanation about what to do and how if plugins
 and themes updating keeps failing. Seems a suitable place would be at the
 top of the update screen.

 > In both cases this is a long time without visual feedback

 Thinking this probably needs some user help/explanations too. At least a
 warning that updates may take several minutes would be nice. Another
 option would be to "fake it" with some JS although not sure if that's good
 enough :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51857#comment:304>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list