Logo
Logo

WP-CLI

Introduction to Breakdance’s WP-CLI Integration

Breakdance includes built-in support for WP-CLI, the command-line interface for WordPress. This allows you to manage many aspects of your Breakdance installation directly from the terminal, which is especially useful for automation, scripting, and managing sites via SSH.

All Breakdance CLI commands are available under the wp breakdance namespace.

Requirements

WP-CLI must be installed and available on your server. The Breakdance CLI commands are only loaded when WP-CLI is active — they have no effect on your site’s front-end or admin performance.

Commands

Status

Display an overview of your Breakdance installation, including directory status, mode, license, and version number.

wp breakdance status

Output includes:

  • Whether all required directories are properly configured
  • The current Breakdance mode
  • License status (Free Mode or Pro Mode)
  • Installed version number

Create Directories

Create all required directories for Breakdance. This is useful after a fresh installation or if directories were accidentally removed.

wp breakdance create_directories

Check Directories

Check whether all required Breakdance directories are properly configured. If any issues are found, the specific directory paths and errors will be listed.

wp breakdance check_directories

Clear Cache

Clear the Breakdance CSS cache and regenerate it. Use this after making changes that aren’t reflected on the front-end, or as part of a deployment script.

wp breakdance clear_cache

Replace URL

Replace URLs across all Breakdance content. This is particularly useful after migrating a site from one domain to another. After replacing URLs, Breakdance will automatically regenerate custom font files.

wp breakdance replace_url <old-url> <new-url>

Example:

wp breakdance replace_url http://old-site.com http://new-site.com

Upon completion, Breakdance will report the number of database rows affected.

Note: It’s always a good idea to have a recent backup of your site before running this command, as it makes direct modifications to the database.

Export Settings

Export your Breakdance global settings to a JSON file. This is useful for backing up your configuration or transferring settings between sites.

wp breakdance export_settings
wp breakdance export_settings --file=/path/to/settings.json

By default, the file is saved to the current directory as breakdance_settings_YYYY-MM-DD.json. Use the --file flag to specify a custom output path.

Note: This command is only available in Pro mode.

Import Settings

Import Breakdance global settings from a previously exported JSON file.

wp breakdance import_settings <file>

Example:

wp breakdance import_settings /path/to/breakdance_settings_2025-01-15.json

The file must contain valid JSON. If the file is not found, unreadable, or contains invalid JSON, the command will report an error.

Note: This command is only available in Pro mode.

License

Set or clear your Breakdance license key.

Set a license key:

wp breakdance license <license-key>

After setting a key, Breakdance displays license information including the product name, validity status, activation status, and expiration date. If the key is not valid, a warning will be shown.

Clear the license key:

wp breakdance license clear

Theme

Enable or disable the WordPress theme system.

wp breakdance theme on
wp breakdance theme off
  • on — Enables the WordPress theme system.
  • off — Disables the WordPress theme system.

Soft Reset

Perform a non-destructive soft reset that refreshes icon sets and fallback templates. This does not remove any of your designs or settings.

wp breakdance soft_reset

Total Reset

Reset your entire Breakdance installation to factory defaults. This is a destructive operation — you will be prompted to confirm before it proceeds.

wp breakdance total_reset

Warning: This will erase all Breakdance settings and data. Make sure you have a backup before running this command.

i18n Commands

Breakdance also includes a command for generating translation files from Breakdance element strings. These commands are available under the wp breakdance i18n namespace.

Generate POT File

Scan all element files in a specified plugin and extract translatable strings into a POT (Portable Object Template) file.

wp breakdance i18n make_pot <plugin-slug>

Options:

  • --domain=<domain> — Text domain to use. Defaults to the plugin slug.
  • --output=<path> — Output path for the POT file. Defaults to {plugin}/languages/{domain}-builder.pot.
  • --skip-audit — Skip the detailed audit report that is shown after extraction.

Examples:

wp breakdance i18n make_pot breakdance-elements
wp breakdance i18n make_pot my-plugin --domain=my-domain
wp breakdance i18n make_pot my-plugin --output=/path/to/custom.pot

The command scans all element.php files in the specified plugin directory and extracts:

  • Element names
  • Control labels
  • Item text values
  • Item label values
  • Preset section labels

Experimental elements are automatically skipped. Strings that are already wrapped in translation functions are also skipped to avoid duplication.

After extraction, an audit report is displayed with statistics on the number of files scanned, total strings found, unique strings, and a breakdown by type. Use --skip-audit to suppress this report.

Meet Breakdance: The Best Visual Builder for WordPress
faces
Join thousands of freelancers and agencies who are working better and faster using Breakdance