Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#52832 closed enhancement (duplicate)

Rename destination instead of removing and enable rollback in WP_Upgrader::install_package()

Reported by: galbaras's profile galbaras Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8
Component: Upgrade/Install Keywords:
Focuses: administration Cc:

Description

WP_Upgrader::install_package() removes (clears) the install destination before attempting to put the new package on the system. So when an installation fails, there's nothing to get back to, because it's already gone.

It would be better to rename "destination" to "destination.old", attempt the installation, and if it fails, rename it back to "destination".

The waste of space is small and very temporary, and there's no need in a feature plugin that zips and unzips the old directory through filters.

Change History (3)

#1 @SergeyBiryukov
4 years ago

Thanks for the ticket!

Just linking to a related ticket: #51857, specifically comment:56:ticket:51857.

#2 follow-up: @galbaras
4 years ago

Oh, thanks for this. Didn't find it ;P

That's essentially the same thing, so I suppose this one can be closed and I'll just join the other happy discussion.

What does "reported-upstream" mean?

#3 in reply to: ↑ 2 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Replying to galbaras:

That's essentially the same thing, so I suppose this one can be closed and I'll just join the other happy discussion.

Yeah, I think the discussion can continue in #51857. Thanks!

What does "reported-upstream" mean?

Generally, it's used if the ticket is for an external library or component, has been reported in an upstream repository (e.g. Gutenberg), and will be addressed there. See The Bug Tracker (Trac) article on handbook for more details :)

Note: See TracTickets for help on using tickets.