WordPress/wp-admin/includes
Sergey Biryukov 7e9421e4d0 Upgrade/Install: Create a temporary backup of plugins and themes before updating.
This aims to make the update process more reliable and ensures that if a plugin or theme update fails, the previous version can be safely restored.

* When updating a plugin or theme, the old version is moved to a temporary backup directory:
 * `wp-content/upgrade-temp-backup/plugins/[plugin-slug]` for plugins
 * `wp-content/upgrade-temp-backup/themes/[theme-slug]` for themes.

* If the update fails, then the backup kept in the temporary backup directory is restored to its original location.
* If the update succeeds, the temporary backup is deleted.

To further help troubleshoot plugin and theme updates, two new checks were added to the Site Health screen:
* A check to make sure that the `upgrade-temp-backup` directory is writable.
* A check that there is enough disk space available to safely perform updates.

To avoid confusion: The temporary backup directory will NOT be used to “roll back” a plugin to a previous version after a completed update. This directory will simply contain a transient backup of the previous version of a plugin or theme being updated, and as soon as the update process finishes, the directory will be empty.

Follow-up to [55204], [55220].

Props afragen, costdev, pbiron, azaozz, hellofromTonya, aristath, peterwilsoncc, TJNowell, bronsonquick, Clorith, dd32, poena, TimothyBlynJacobs, audrasjb, mikeschroder, a2hosting, KZeni, galbaras, richards1052, Boniu91, mai21, francina, TobiasBg, desrosj, noisysocks, johnbillion, dlh, chaion07, davidbaumwald, jrf, thisisyeasin, ignatggeorgiev, SergeyBiryukov.
Fixes #51857.
Built from https://develop.svn.wordpress.org/trunk@55720


git-svn-id: http://core.svn.wordpress.org/trunk@55232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-04 02:36:23 +00:00
..
admin-filters.php Editor: Refresh nones for metaboxes after reauthentication. 2022-09-11 20:46:10 +00:00
admin.php I18N: Always pass $locale to load_textdomain(). 2022-11-10 19:40:11 +00:00
ajax-actions.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
bookmark.php Docs: Various improvements in Bookmark Administration API function descriptions, as per docblocks standards. 2023-05-03 10:03:21 +00:00
class-automatic-upgrader-skin.php Code Modernization: Fix reserved keyword and parameter name mismatches for parent/child classes in WP_Upgrader_Skin::feedback(). 2021-09-09 13:48:56 +00:00
class-bulk-plugin-upgrader-skin.php Code Modernization: Explicitly declare all properties in WP_Ajax_Upgrader_Skin. 2022-08-29 12:46:10 +00:00
class-bulk-theme-upgrader-skin.php Code Modernization: Explicitly declare all properties in WP_Ajax_Upgrader_Skin. 2022-08-29 12:46:10 +00:00
class-bulk-upgrader-skin.php Code Modernization: Fix parameter name mismatches for parent/child classes in WP_Upgrader_Skin::error(). 2021-09-09 13:59:56 +00:00
class-core-upgrader.php Administration: Replace "can not" with "cannot" after [53131]. 2022-04-11 11:50:01 +00:00
class-custom-background.php Help/About: Use the new /documentation/ URLs for HelpHub links in WordPress Admin. 2023-02-23 10:38:21 +00:00
class-custom-image-header.php Help/About: Use the new /documentation/ URLs for HelpHub links in WordPress Admin. 2023-02-23 10:38:21 +00:00
class-file-upload-upgrader.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
class-ftp-pure.php Docs: Update URLs in some @link tags and switch them to HTTPS. 2019-11-01 14:57:02 +00:00
class-ftp-sockets.php Administration: Replace contracted verb forms for better consistency. 2022-03-22 16:25:03 +00:00
class-ftp.php Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-ftp.php. 2022-03-26 15:28:08 +00:00
class-language-pack-upgrader-skin.php Code Modernization: Fix parameter name mismatches for parent/child classes in WP_Upgrader_Skin::error(). 2021-09-09 13:59:56 +00:00
class-language-pack-upgrader.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-pclzip.php Filesystem API: Make sure to only call fread() on non-empty files in PclZip::privAddFile(). 2021-08-29 01:33:58 +00:00
class-plugin-installer-skin.php Docs: Clarify the ::hide_process_failed() return value in plugin and theme installer. 2023-03-27 15:11:20 +00:00
class-plugin-upgrader-skin.php Text Changes: Unify various "Back to..." vs. "Return to..." vs. "Go to..." strings. 2020-11-09 10:53:10 +00:00
class-plugin-upgrader.php Upgrade/Install: Create a temporary backup of plugins and themes before updating. 2023-05-04 02:36:23 +00:00
class-theme-installer-skin.php Docs: Clarify the ::hide_process_failed() return value in plugin and theme installer. 2023-03-27 15:11:20 +00:00
class-theme-upgrader-skin.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-theme-upgrader.php Upgrade/Install: Create a temporary backup of plugins and themes before updating. 2023-05-04 02:36:23 +00:00
class-walker-category-checklist.php Code Modernization: Fix reserved keyword and parameter name mismatches for parent/child classes in Walker::end_el(). 2021-09-09 13:03:55 +00:00
class-walker-nav-menu-checklist.php Code Modernization: Fix last parameter name mismatches for parent/child classes in Walker::start_el(). 2021-09-09 12:39:59 +00:00
class-walker-nav-menu-edit.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-ajax-upgrader-skin.php Code Modernization: Explicitly declare all properties in WP_Ajax_Upgrader_Skin. 2022-08-29 12:46:10 +00:00
class-wp-application-passwords-list-table.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-automatic-updater.php Docs: Add missing @return tag for WP_Automatic_Updater::is_disabled(). 2023-03-27 14:13:22 +00:00
class-wp-comments-list-table.php Comments: Prime post caches in WP_Comments_List_Table. 2023-03-10 15:26:22 +00:00
class-wp-community-events.php Administration: Guard against false transient key in get_cached_events(). 2022-09-27 18:57:13 +00:00
class-wp-debug-data.php Media: Add WP_Image_Editor_Imagick::set_imagick_time_limit() method. 2023-02-22 14:25:25 +00:00
class-wp-filesystem-base.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-direct.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-ftpext.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-ftpsockets.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-filesystem-ssh2.php Filesystem API: Correct and improve the return type documentation for the dirlist() method in WP_Filesystem_Base and its extending classes. 2023-05-03 21:30:19 +00:00
class-wp-importer.php Docs: Use third-person singular verbs for WP_Importer related function descriptions, as per docblocks standards. 2023-04-20 10:41:20 +00:00
class-wp-internal-pointers.php Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
class-wp-links-list-table.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-list-table-compat.php Docs: Add missing descriptions for _WP_List_Table_Compat methods. 2020-11-14 16:54:08 +00:00
class-wp-list-table.php Docs: Miscellaneous improvements and corrections to docblocks. 2023-02-07 21:21:18 +00:00
class-wp-media-list-table.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
class-wp-ms-sites-list-table.php Networks and Sites: Simplify the check for main site on Network Admin → Sites screen. 2023-04-20 14:30:19 +00:00
class-wp-ms-themes-list-table.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-ms-users-list-table.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-plugin-install-list-table.php Coding Standards: Replace include_once with require_once for required files. 2023-04-09 11:57:22 +00:00
class-wp-plugins-list-table.php Coding Standards: Remove unused variable in WP_Plugins_List_Table::single_row(). 2023-03-21 13:27:21 +00:00
class-wp-post-comments-list-table.php Administration: Remove private delegation from list tables. 2022-10-04 03:47:15 +00:00
class-wp-posts-list-table.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
class-wp-privacy-data-export-requests-list-table.php Privacy: Fix "Retry" action after a personal data export failure. 2022-03-10 19:22:01 +00:00
class-wp-privacy-data-removal-requests-list-table.php Coding Standards: Fix WPCS issues in [49258]. 2020-10-20 21:20:07 +00:00
class-wp-privacy-policy-content.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
class-wp-privacy-requests-table.php Administration: Add new get_views_links method to WP_List_Table. 2022-09-19 21:08:10 +00:00
class-wp-screen.php Docs: Correct and improve various documented types for properties, functions, and hooks. 2023-04-27 22:29:18 +00:00
class-wp-site-health-auto-updates.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-site-health.php Upgrade/Install: Create a temporary backup of plugins and themes before updating. 2023-05-04 02:36:23 +00:00
class-wp-site-icon.php Coding Standards: Use strict comparison in wp-admin/includes/class-wp-site-icon.php. 2023-04-23 04:02:18 +00:00
class-wp-terms-list-table.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-theme-install-list-table.php Administration: Remove private delegation from list tables. 2022-10-04 03:47:15 +00:00
class-wp-themes-list-table.php Administration: Remove private delegation from list tables. 2022-10-04 03:47:15 +00:00
class-wp-upgrader-skin.php Docs: Clarify the ::hide_process_failed() return value in plugin and theme installer. 2023-03-27 15:11:20 +00:00
class-wp-upgrader-skins.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
class-wp-upgrader.php Upgrade/Install: Create a temporary backup of plugins and themes before updating. 2023-05-04 02:36:23 +00:00
class-wp-users-list-table.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
comment.php Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/comment.php, as per docblocks standards. 2022-07-20 22:15:10 +00:00
continents-cities.php I18N: Update list of continents and cities for the timezone selection. 2022-09-19 23:24:11 +00:00
credits.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
dashboard.php Administration: Update dashboard welcome panel colors, remove broken link 2023-03-21 15:37:21 +00:00
deprecated.php Coding Standards: Use strict comparison where substr() is involved. 2023-04-16 10:48:22 +00:00
edit-tag-messages.php Docs: Various inline documentation corrections and improvements. 2021-12-07 12:20:02 +00:00
export.php Docs: Improve various globals documentation, as per documentation standards. 2022-12-09 11:54:13 +00:00
file.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
image-edit.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
image.php Media: Revert WebP generation. 2022-09-19 22:53:10 +00:00
import.php Docs: Various docblock improvements in Importer Administration API, as per docs standards. 2022-07-29 09:22:10 +00:00
list-table.php Administration: Remove private delegation from list tables. 2022-10-04 03:47:15 +00:00
media.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
menu.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
meta-boxes.php Help/About: Avoid extra redirections on HelpHub Links. 2023-02-23 11:06:19 +00:00
misc.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
ms-admin-filters.php Networks and Sites: Officially remove global terms. 2022-09-20 02:51:09 +00:00
ms-deprecated.php Networks and Sites: Officially remove global terms. 2022-09-20 02:51:09 +00:00
ms.php Docs: All sorts of improvements and corrections to function and hook docs. 2023-04-27 23:15:17 +00:00
nav-menu.php Coding Standards: Escape the whole attributes in wp-admin/includes/nav-menu.php. 2023-04-01 08:37:20 +00:00
network.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
noop.php Coding Standards: Fix brace indentation in wp-align/includes/noop.php. 2022-11-26 09:12:17 +00:00
options.php Help/About: Avoid extra redirections on HelpHub Links. 2023-02-23 11:06:19 +00:00
plugin-install.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
plugin.php Docs: Remove code tags from WordPress function names within inline documentation. 2022-08-11 13:55:08 +00:00
post.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
privacy-tools.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
revision.php Revisions: Use update_post_author_caches in wp_prepare_revisions_for_js function. 2022-12-06 13:42:13 +00:00
schema.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
screen.php Coding Standards: Use strict comparison in wp-admin/includes/screen.php. 2021-05-09 20:27:02 +00:00
taxonomy.php Coding Standards: Use strict comparison in wp-admin/includes/taxonomy.php. 2023-03-10 07:04:20 +00:00
template.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
theme-install.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
theme.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
translation-install.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
update-core.php Code Modernization: Replace usage of strpos() with str_starts_with(). 2023-05-02 15:45:22 +00:00
update.php Help/About: Use the new /documentation/ URLs for links about WordPress version. 2023-04-04 22:38:22 +00:00
upgrade.php Coding Standards: Break out of the inner loop in make_site_theme_from_default(). 2023-04-29 18:30:23 +00:00
user.php Docs: All sorts of improvements and corrections to function and hook docs. 2023-04-27 23:15:17 +00:00
widgets.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00