Manually Updating Your WooCommerce Database via Command Line

Last Updated -

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.

  1. Begin by logging into your WordPress site via SSH.
  2. Next, access the root directory of your site like this (replacing with your site's domain):
    cd ~/sites/
  3. 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!

Related Topics

Pagely is the Managed WordPress Hosting Platform designed to exceed the needs of media, business, and Enterprise customers alike. We help the world's biggest brands scale WordPress.

Copyright © 2006-2017 Pagely, Inc. All rights reserved.
Pagely® and WordPress® are registered trademarks.

Powered by Zendesk