Upgrading the database using WP CLI

When new versions of CoCart are released, you maybe be prompted to run a database upgrade. Whilst it’s possible to do this through WP admin, advanced users may prefer to run these upgrades via the CLI, for example, on busy stores where timeouts could occur.

This page outlines how to install and begin using the WP CLI.

To update the database, use the following CLI command:

wp cocart update

There are no extra arguments needed, and only the pending upgrades will be ran. Once the updates have proceeded, the new version will be shown.