Resetting BigCommerce for WordPress via Command Line

For some reason the connection between WordPress and the BigCommerce store via API seems a bit “fragile.” I have had situations where it appears to work, but product images don’t transfer, or product reviews don’t transfer, or some other functionality appears broken. One thing to try is to reset the plugin – basically deactivate the plugin, delete it, and then re-add the plugin thereby resetting the API connection.

However, I ran into some issues doing this on our favorite host – Pantheon. Pantheon does not allow you to add plugins to their test and live environments. The best way to reset the API connection in these cases is with the command line.

First, the Pantheon command line tool is called Terminus. Install that with the instructions on Pantheon here: https://pantheon.io/docs/terminus

Then, the reset command is as follows:

terminus wp SITE-NAME.SITE-ENVIRONMENT -- bigcommerce dev reset-plugin

Here you would replace the SITE-NAME and SITE-ENVIRONMENT, for example:

terminus wp my-site.dev -- bigcommerce dev reset-plugin

This will delete database references to the API connection and allow you to reconnect the API without needing to remove the plugin.