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

WordPress Trac noreply at wordpress.org
Wed Jul 21 03:36:25 UTC 2021


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

Comment (by 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.

 Also, as mentioned in Slack, I will work to provide usable repro
 instructions for this for core as I am currently only using WordPress.com
 to generate concurrent plugin update requests.

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


More information about the wp-trac mailing list