Before you make any changes, always take a backup of your site. This keeps your data safe if anything goes wrong.
Core Commands
WP-CLI commands where introduced since v3
Command | Description |
---|---|
wp cocart update | Updates the CoCart database. |
wp cocart version | Returns the version of CoCart installed. |
wp cocart db-version | Returns the database version of CoCart installed. |
Plus Commands
Command | Description |
---|---|
wp cocart plus version | Returns the version of CoCart Plus you have installed. |
Plugin Slugs
Use the following slugs to manage CoCart plugins with WP-CLI. The slugs are used in the command line to identify the specific plugin you want to work with.Plugin | Plugin Slug |
---|---|
CoCart Core (Legacy) | cart-rest-api-for-woocommerce |
CoCart Core | cocart |
CoCart Plus | cocart-plus |
CoCart JWT Authentication | cocart-jwt-authentication |
Frequently Asked Questions
What is WP-CLI?
What is WP-CLI?
WP-CLI is a powerful set of command-line tools for managing WordPress installations in the terminal saving you time and effort. You can update plugins, configure multisite installations, and much more, all without using a web browser.
How can I update a plugin using WP-CLI?
How can I update a plugin using WP-CLI?
To update a plugin using WP-CLI, first go to your WordPress directory in the terminal. Then type the command
wp plugin update <plugin-slug>
, replacing plugin-slug with the name of the plugin you want to update. This will update the plugin to its latest version.Why can I not install a specific CoCart plugin using WP-CLI?
Why can I not install a specific CoCart plugin using WP-CLI?
Not all CoCart plugins are available for installation via WP-CLI as they are not hosted on the WordPress plugin directory. Other plugins must be installed manually by downloading them.
What are the advantages of using WP-CLI for plugin management?
What are the advantages of using WP-CLI for plugin management?
WP-CLI helps you manage plugins much faster by using simple commands in the terminal. You do not need to log in to the WordPress dashboard or click many buttons.It can save time, reduce mistakes, and make it easier to manage many sites. WP-CLI is useful for both beginners and advanced users.
Where can I find more information about WP-CLI?
Where can I find more information about WP-CLI?
For more information about WP-CLI visit the official site https://wp-cli.org/