Rollback Update Failure


This is a feature plugin based on the PR for #51857.

The assumption is that most of the errors in large plugins/themes occur during the copy_dir() part of WP_Upgrader::install_package(). Trac ticket #52342 brought more error reporting to copy_dir() and Trac ticket #52831 provides a filter hook in order to process the rollback in the event of a plugin/theme update failure. As of WordPress 5.7-beta1 both of these tickets are in core.

It is during the WP_Upgrader::install_package() that the currently installed plugin is deleted in anticipation of copying the new update into that location. Having an empty plugin/theme folder or an incompletely copied update seems to be the most common issue.

There will be messaging in the event of an error and successful or unsuccessful rollback.


There was much discussion regarding the thought that adding additional IO processes for the zip and unzip process could result in server timeout issues on resource starved shared hosts. Activating the feature plugin will result in the creation of a zipfile of the installed plugin/theme being updated.

For the sake of testing assume any server timeout occurring during the update process might be releated to the additional IO processes creating the zipfile. Please report these in GitHub Issues and report your server details. ( Host, RAM, OS, etc. )

To simulate a failure, use the filter add_filter( 'rollback_update_testing', '__return_true' );

Alternatively you can install the Rollback Update Testing plugin, activating it as needed.


Please submit issues and PRs to GitHub.


14 July 2021
That is great! I have just one question! How many times this plugin could roll back a theme or a plugin update, can it roll back for example three steps back? Thank you for your answer in advance!
Read all 2 reviews

Contributors and Developers

“Rollback Update Failure” is open source software. The following people have contributed to this plugin.


“Rollback Update Failure” has been translated into 5 locales. Thank you to the translators for their contributions.

Translate “Rollback Update Failure” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Change Log

Please see the Github repository:

0.5.3 / 2021-07-01

  • add @10up GitHub Actions integration for WordPress SVN

0.5.2 / 2021-06-10

  • exit early if $hook_extra is empty

0.5.1 / 2021-03-15

  • update error message for installation not update

0.5.0 / 2021-02-10

  • initial commit
  • use simpler hook for extract_rollback
  • update for upgrader_install_package_result filter and parameters passed
  • add text domain
  • update error message display
  • added filter rollback_update_testing to simulate a failure.
  • override filter if there’s already a WP_Error