WP CLI

Supercharger provides WP-CLI commands for server-side management of the plugin. These are useful for automation, deployment scripts, and server administration.

All commands follow the pattern: wp supercharger

Requirements

  • [WP-CLI](https://wp-cli.org/) must be installed on your server.
  • The Supercharger plugin must be active.
  • Commands must be run from the WordPress root directory.

Database Commands

wp supercharger db init

Creates or upgrades the Supercharger database tables. Run this after a plugin update or if the database tables are missing.

bash
wp supercharger db init

wp supercharger db health

Checks the existence and status of all Supercharger database tables. Outputs a summary of each table’s state.

bash
wp supercharger db health

Example output:

Table: wp_supercharger_vectors    Status: OK
Table: wp_supercharger_options    Status: OK
Table: wp_supercharger_logs       Status: OK
Table: wp_supercharger_statistics Status: OK
Table: wp_supercharger_cache      Status: OK

Usage Examples

Check database health after a migration:

bash
wp supercharger db health

Re-initialize tables after a plugin update:

bash
wp supercharger db init

Combine with other WP-CLI commands in a deployment script:

bash
wp plugin activate supercharger
wp supercharger db init
wp cache flush

General WP-CLI Tips

You can use standard WP-CLI flags with Supercharger commands:

  • --path=/var/www/html — Specify the WordPress path
  • --url=https://yoursite.com — Specify the site URL (useful for multisite)
  • --quiet — Suppress informational output
  • --debug — Show debug information