[wp-trac] [WordPress Trac] #53705: Plugin upgrade deletes files from other in-progress upgrades

WordPress Trac noreply at wordpress.org
Mon Mar 28 00:46:42 UTC 2022


#53705: Plugin upgrade deletes files from other in-progress upgrades
-----------------------------+---------------------
 Reporter:  bpayton          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  6.0
Component:  Upgrade/Install  |     Version:  5.8
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+---------------------

Comment (by peterwilsoncc):

 Replying to [comment:6 bpayton]:
 > Instead of deleting old upgrade files on the fly, I think wp-
 content/upgrade/ cleanup should probably happen as part of a focused WP-
 Cron event, perhaps only deleting plugin dirs that are at least X hours
 old. I am working on a patch to propose this.
 >
 > Maybe it would be better to just add a condition so leftover `wp-
 content/upgrade/` subdirectories are only removed if they are over X units
 of time old (maybe over a day old to be really conservative). It's kind of
 a hack, but it's also simpler than worrying about WP-Cron events for
 cleanup and seems very low risk.

 I've been thinking about this and don't think it's a wise idea.

 In terms of meeting the website owners expectations: this approach would
 leave unexpected files on the server in an unexpected location.

 If the file names are predictable then a more targeted delete while
 preparing for the upgrade could be a better solution.

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


More information about the wp-trac mailing list