WooCommerce database schema version after an interrupted upgrade
0 reputation · 04 Jul 2021, 06:06 UTC
WooCommerce database schema version after an interrupted upgrade
Goal: decide whether to re-run the WooCommerce database update from WooCommerce > Status > Tools > Database when an upgrade fails partway through and woocommerce_db_version is left at the previous or an intermediate value.
WooCommerce compares that option against the bundled plugin version to trigger WC_Install routines. Completed SQL statements are not automatically rolled back if the updater stops because of a timeout, fatal error, or memory limit, and downgrading the plugin does not revert applied schema changes. Exact updater behavior and tool availability vary across WooCommerce major branches.
Assumes a current WooCommerce release and a recent database backup. Verification should compare woocommerce_db_version in wp_options with the plugin version constant and confirm whether the database update button appears on a staging clone before production changes.
Specific questions:
- Is re-running the database updater idempotent on a partially migrated schema, or can it produce duplicate column or table errors?
- Must
woocommerce_db_versionbe manually corrected before re-running, or does the updater resolve the mismatch itself? - Which WooCommerce major version branches document safe re-runs after an interrupted update?