WordPress/wp-admin
Sergey Biryukov dcca93232b 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 temporary backup kept in the `upgrade/temp-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 `temp-backup` directory is writable.
* A check that there is enough disk space available to safely perform updates.

To avoid confusion: The `temp-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.

Props aristath, afragen, pbiron, dd32, poena, TimothyBlynJacobs, audrasjb, mikeschroder, a2hosting, hellofromTonya, KZeni, galbaras, richards1052, Boniu91, mai21, francina, SergeyBiryukov.
See #51857.
Built from https://develop.svn.wordpress.org/trunk@51815


git-svn-id: http://core.svn.wordpress.org/trunk@51422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-15 18:41:00 +00:00
..
css Coding Standards: Apply coding standards on CSS. 2021-09-02 22:18:00 +00:00
images Help/About: Update the About section for 5.8. 2021-07-06 18:38:57 +00:00
includes Upgrade/Install: Create a temporary backup of plugins and themes before updating. 2021-09-15 18:41:00 +00:00
js Editor: Revert [51748] and [51649]. They intorduced a bug where `wp.editor` may be replaced with `wp.oldEditor` in certain cases. 2021-09-08 23:29:58 +00:00
maint Database: Check the correct value for displaying the "Successfully repaired table" or "Failed to repair" messages on Database Repair screen. 2020-12-04 15:50:12 +00:00
network Networks and Sites: Replace two remaining occurrences of "blog" with "site" in user-facing strings. 2021-07-28 10:02:00 +00:00
user Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
about.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
admin-ajax.php Login and Registration: Improve the UX of the Reset Password screen. 2021-02-02 18:13:04 +00:00
admin-footer.php Coding Standards: Simplify a condition in `wp-admin/admin-footer.php`. 2021-06-01 11:30:57 +00:00
admin-functions.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
admin-header.php Adds the widgets block editor to widgets.php and customize.php 2021-05-25 08:40:25 +00:00
admin-post.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
admin.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
async-upload.php Media: Improve upload page media item layout on smaller screens. 2021-06-22 04:26:58 +00:00
authorize-application.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
comment.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
credits.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
custom-background.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
custom-header.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
customize.php Customize: Add wp-embed-responsive class to body if using widgets block editor 2021-09-01 07:10:56 +00:00
edit-comments.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
edit-form-advanced.php Editor: Use a consistent way to retrieve post ID on Edit Post screens. 2021-04-09 11:31:09 +00:00
edit-form-blocks.php Coding Standards: Use static closures when not using `$this`. 2021-08-26 12:59:02 +00:00
edit-form-comment.php Comments: Escape comment author's email in the Edit Comment form. 2021-06-07 18:47:02 +00:00
edit-link-form.php Posts, Post Types: Update the styling of the legacy Links editing screen. 2021-02-16 18:50:03 +00:00
edit-tag-form.php Administration: Consistently escape `admin_url()` links. 2021-06-17 14:37:00 +00:00
edit-tags.php Docs: Correct comment format in `wp-admin/edit-tags.php`, remove extra space. 2021-04-18 14:29:03 +00:00
edit.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
erase-personal-data.php Coding Standards: Remove wrapping HTML tags from translatable strings. 2021-07-08 17:07:58 +00:00
export-personal-data.php Coding Standards: Remove wrapping HTML tags from translatable strings. 2021-07-08 17:07:58 +00:00
export.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
freedoms.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
import.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
index.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
install-helper.php Docs: Improve documentation for functions in `wp-admin/install-helper.php` per the documentation standards. 2020-05-12 18:40:07 +00:00
install.php Coding Standards: Move some translator comments to the correct place. 2021-03-21 13:13:03 +00:00
link-add.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
link-manager.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
link-parse-opml.php XML-RPC: Explicitly unset the reference to the parser resource after calling `xml_parser_free()` to avoid memory leaks in PHP 7.0.0 or higher. 2020-07-05 15:22:01 +00:00
link.php Coding Standards: Apply some alignment fixes from `composer format`. 2021-07-27 19:01:59 +00:00
load-scripts.php Coding Standards: Fix instances of `Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty`. 2020-05-26 09:37:10 +00:00
load-styles.php Block Editor: Load the `WP_Theme_JSON_Resolver` class in `wp-admin/load-styles.php`. 2021-06-01 23:09:58 +00:00
media-new.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
media-upload.php Docs: Add examples of possible names for various hooks whose name contains a dynamic portion. 2021-03-07 12:32:09 +00:00
media.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
menu-header.php Coding Standards: Replace alias PHP functions with the canonical names. 2020-10-18 17:27:06 +00:00
menu.php Themes: Display the number of available theme updates in the admin menu. 2021-05-26 01:17:57 +00:00
moderation.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-admin.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-delete-site.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
ms-edit.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-options.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-sites.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-themes.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-upgrade-network.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-users.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
my-sites.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
nav-menus.php Menus: Save display locations for new menus. 2021-08-30 04:12:57 +00:00
network.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
options-discussion.php Coding Standards: Use strict comparisons in `wp-admin/options-discussion.php`. 2021-08-05 03:30:57 +00:00
options-general.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
options-head.php Administration: Replace legacy `updated` message type in `add_settings_error()` calls with `success`. 2019-08-16 00:39:55 +00:00
options-media.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
options-permalink.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
options-privacy.php Coding Standards: Use static closures when not using `$this`. 2021-08-26 12:59:02 +00:00
options-reading.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
options-writing.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
options.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
plugin-editor.php Code Modernization: Check the return type of `parse_url()` on Plugin/Theme Editor screens. 2021-08-17 21:56:58 +00:00
plugin-install.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
plugins.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
post-new.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
post.php Block Editor: Use a unique name for the nonce of the custom fields toggle form. 2021-02-08 21:39:16 +00:00
press-this.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
privacy-policy-guide.php Coding Standards: Use static closures when not using `$this`. 2021-08-26 12:59:02 +00:00
privacy.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
profile.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
revision.php Coding Standards: Apply some alignment fixes from `composer format`. 2021-07-27 19:01:59 +00:00
setup-config.php Upgrade/Install: Use consistent capitalization for "web host" in setup messages. 2021-08-14 12:06:59 +00:00
site-health-info.php Site Health: Support custom sub-menus and pages. 2021-04-17 01:14:01 +00:00
site-health.php Site Health: Improve readability of site titles. 2021-06-28 23:07:57 +00:00
term.php Coding Standards: Use strict type check for `in_array()` and `array_search()` where strings are involved. 2020-04-05 03:02:11 +00:00
theme-editor.php Code Modernization: Check the return type of `parse_url()` on Plugin/Theme Editor screens. 2021-08-17 21:56:58 +00:00
theme-install.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
themes.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
tools.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
update-core.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
update.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
upgrade-functions.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
upgrade.php Coding Standards: Move some translator comments to the correct place. 2021-03-21 13:13:03 +00:00
upload.php Coding Standards: Use strict comparisons in `wp-admin/upload.php`. 2021-08-05 03:37:56 +00:00
user-edit.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
user-new.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
users.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00
widgets-form-blocks.php Widgets: Pass correct context to `get_block_categories()` calls. 2021-08-31 13:38:58 +00:00
widgets-form.php Widgets: Revert [51705]. 2021-09-09 21:40:57 +00:00
widgets.php Docs: Add a comment about the `$title` global usage in various admin files. 2021-07-22 13:53:00 +00:00