Testing the Rollback Update Failure Plugin
Hint: Preceding the following
wp
calls with thetime
command will provide execution timing to help with before and after patch comparisons. E.g.time wp plugin update --all
.
# install the Rollback Update Failure plugin (plugin to test)
wp plugin install rollback-update-failure --activate
# [OPTIONAL] install the Rollback Update Testing plugin (to simulate failures)
wp plugin install https://gist.github.com/afragen/80b68a6c8826ab37025b05d4519bb4bf/archive/a8858b736ff82301c239afb1b12f017309b3f8b2.zip
Configure/Reset
# install and reset plugins to old versions
wp plugin install akismet --version=4.2.3 --force
wp plugin install jetpack --version=10.9 --force
wp plugin install mailpoet --version=3.90.0 --force
wp plugin install woocommerce --version=6.6.0 --force
Single Plugin Updates
wp plugin update akismet
wp plugin update jetpack
wp plugin update mailpoet
wp plugin update woocommerce
# verify temp-backup directory is empty
ls wp-content/upgrade/temp-backup/plugins
Bulk Plugin Update
wp plugin update --all
# verify temp-backup directory is empty
ls wp-content/upgrade/temp-backup/plugins
Configure/Reset
wp theme install twentytwentytwo --version=1.1 --force
wp theme install twentytwenty --version=1.9 --force
wp theme install avant-garde --version=1.1 --force
wp theme install kubrick2 --version=1.0 --force
Single Theme Updates
wp theme update twentytwentytwo
wp theme update twentytwenty
wp theme update avant-garde
wp theme update kubrick2
# verify temp-backup directory is empty
ls wp-content/upgrade/temp-backup/themes
Bulk Theme Update
wp theme update --all
# verify temp-backup directory is empty
ls wp-content/upgrade/temp-backup/themes