Skip to main content

Utility commands

Developer and test-environment commands. Most of these are restricted to non-production environments.

unzip

Extracts a ZIP archive to a specified directory using the WordPress Filesystem API. Intended for internal Burst workflows (such as extracting geo-IP database updates), but available as a standalone command when you need a WordPress-context-aware unzip operation.

Usage:

wp burst unzip --zip_path=<path> --extract_to=<path>

Arguments:

ArgumentTypeRequiredDescription
--zip_pathstringYesAbsolute path to the ZIP file to extract
--extract_tostringYesAbsolute path to the target directory. Created automatically if it does not exist

Output:

Success: Extracted /tmp/burst-data.zip to /var/www/html/wp-content/uploads/burst

Example:

wp burst unzip \
--zip_path=/tmp/burst-data.zip \
--extract_to=/var/www/html/wp-content/uploads/burst

The command uses the WordPress Filesystem API, which respects the configured filesystem method (direct, ftp, ssh2). On most hosting environments this resolves to direct.


send_test_telemetry

Sends a test telemetry payload to the Burst data-sharing endpoint. Use this to verify that the telemetry pipeline is reachable and that the payload format is accepted.

caution

This command only works in test environments (WP_ENV=test or equivalent) or when BURST_ALLOW_TEST_TELEMETRY is defined in wp-config.php. It exits with an error on standard production sites.

Usage:

wp burst send_test_telemetry [--endpoint=<url>]

Arguments:

ArgumentTypeRequiredDescription
--endpointstringNoCustom endpoint URL to send the payload to. Defaults to the built-in Burst telemetry endpoint

Output — default endpoint:

Sending test telemetry to default endpoint
{ ... }
Success: Test telemetry sent successfully

Output — custom endpoint:

Sending test telemetry to custom endpoint: https://example.com/telemetry
{ ... }
Success: Test telemetry sent successfully

Enabling outside a test environment

Add to wp-config.php:

define( 'BURST_ALLOW_TEST_TELEMETRY', true );

Remove this constant before deploying to production.

Sending to a local mock endpoint

Useful in CI pipelines where you want to verify the payload structure without hitting the real endpoint:

Show code
# Start a simple HTTP listener in a separate shell.
python3 -m http.server 9000

# Send the payload to it.
wp burst send_test_telemetry --endpoint=http://localhost:9000/telemetry

Scans the plugin's PHP source files and outputs a JSON array of all internal admin URLs and anchor targets found in the code. Used to verify that no dead admin links exist after refactoring.

caution

This command is restricted to test environments and silently exits on production sites.

Usage:

wp burst get_internal_links

Output:

Show code
[
"#/dashboard",
"#/settings/tracking",
"#/statistics",
...
]

No arguments are accepted.

Show code
#!/usr/bin/env bash
# Collect all internal links and check them against the known valid set.

LINKS=$(wp burst get_internal_links --quiet)
echo "$LINKS" | jq '.[]' | sort > /tmp/burst-links-current.txt
diff /tmp/burst-links-expected.txt /tmp/burst-links-current.txt