In certain cases, the WooCommerce plugin will update, but the WooCommerce database update will fail.
The failure of updating the database is usually caused by PHP timing out, especially on the shared hosting environment, since PHP only has 60 seconds to execute via a web request.
This version mismatch between the WooCommerce database version and the WooCommerce plugin version can cause potential issues. To alleviate these concerns, the WooCommerce database can be updated through the command line.
Note: If you are on a legacy shared hosting plan, please open a support ticket so that our support agents can run this command for you.
- Begin by logging into your WordPress site via SSH.
- Next, access the root directory of your site like this (replacing example.com with your site's domain):
- Finally, update the WooCommerce database using WP-CLI:
wp wc update
Depending on the size of your database, this might take some time to run. Once the database upgrade is done, you should see something like this:
Calling update function: wc_update_320_mexican_states
Calling update function: wc_update_320_db_version
Success: 2 updates complete. Database version is 3.2.0
That's all there is to it! Your WooCommerce database has now been updated!