[wp-trac] [WordPress Trac] #52832: Rename destination instead of removing and enable rollback in WP_Upgrader::install_package()
WordPress Trac
noreply at wordpress.org
Wed Mar 17 07:12:41 UTC 2021
#52832: Rename destination instead of removing and enable rollback in
WP_Upgrader::install_package()
-----------------------------+-----------------------------
Reporter: galbaras | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: trunk
Severity: normal | Keywords:
Focuses: administration |
-----------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52832>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list