DOCUMENTATION · WP-CLI

WP-CLI commands

Six commands that cover the full plugin lifecycle from the terminal. Designed for agencies, platform engineers and CI pipelines that manage multiple WordPress sites.

Why WP-CLI

If you manage 1 site, you'll never need this — the WordPress admin does everything. If you manage 30 client sites, you'll script the activation and bulk conversion across all of them in one bash loop:

bash
for site in client1.com client2.com client3.com; do
    wp --url="$site" plugin install tempaloo-webp --activate
    wp --url="$site" tempaloo activate "$LICENSE_KEY"
    wp --url="$site" tempaloo bulk --limit=500
done

Same setup, 30 sites, one terminal. That's the agency pattern that drives the bulk of revenue at ShortPixel and Imagify — and it's now first-class on Tempaloo.

Prerequisites

  • WP-CLI installed on your server. Check with wp --info.
  • Plugin v0.5.0+ activated (commands are auto-registered when WP-CLI is detected).
LocalWP users
Open your site → menu → Open site shell. WP-CLI is bundled. Type wp tempaloo status to confirm.

wp tempaloo status

Show license, plan, quota, settings, and current API health. Always start here when troubleshooting.

Terminal
$ wp tempaloo status
+---------------+--------------+-----+
| field         | value        |     |
+---------------+--------------+-----+
| license_valid | yes          |     |
| plan          | growth       |     |
| images_limit  | 25000        |     |
| sites_limit   | 5            |     |
| output_format | webp         |     |
| quality       | 85           |     |
| auto_convert  | yes          |     |
| serve_webp    | yes          |     |
| resize_max_px | 2560         |     |
| api_health    | ok           |     |
+---------------+--------------+-----+

Add --format=json for machine-readable output (useful in CI).

wp tempaloo activate <license-key>

Activate a license key. Verifies it against the API and stores the plan, format support, and quotas locally.

Terminal
$ wp tempaloo activate tw_live_8b7f2c3a4e5d6
Success: License activated on growth plan.
Idempotent but not free
Each call hits the API. Don't put this in a loop that runs every minute — once on install is enough.

wp tempaloo bulk [--dry-run] [--limit=N]

Convert every supported attachment that doesn't already have a tempaloo_webp meta block. Shows a progress bar and stops cleanly if the monthly quota is reached mid-run.

Preview without running

Terminal
$ wp tempaloo bulk --dry-run
1247 pending attachment(s) would be converted.

Process a capped batch

Terminal
$ wp tempaloo bulk --limit=200
Converting  100% [========================================]  0:42 / 0:42
Success: 198 converted, 2 failed.
Quota exhaustion is graceful
If you hit your monthly cap mid-run, the command stops, prints how many remain, and leaves the progress bar in a clean state. Upgrade or wait for the rollover, then re-run the command — it picks up where it stopped.

wp tempaloo restore [--ids=...] [--yes]

Delete every .webp / .avif sibling we wrote. Originals (.jpg, .png, .gif) are never touched.

Restore everything

Terminal
$ wp tempaloo restore
Are you sure you want to delete .webp/.avif siblings for 847 attachment(s)? Originals are NOT touched. [y/n] y
Restoring  100% [========================================]  0:12 / 0:12
Success: Restored 847 attachment(s); removed 6584 sibling file(s).

Restore specific attachments only

bash
wp tempaloo restore --ids=12,34,56 --yes

--yes skips the confirmation prompt — useful in CI / scripts.

wp tempaloo quota

Live quota check from the API.

Terminal
$ wp tempaloo quota
+------------------+----------------------+
| field            | value                |
+------------------+----------------------+
| plan             | growth               |
| images_used      | 4287                 |
| images_limit     | 25000                |
| images_remaining | 20713                |
| sites_used       | 3                    |
| period_end       | 2026-05-01           |
+------------------+----------------------+
Use in monitoring
Combine with --format=json + jq to plug into your alerting: wp tempaloo quota --format=json | jq '.[].images_remaining'.

wp tempaloo settings get|set <key> [<value>]

Read or write any setting from the CLI. Useful when rolling out a config change to multiple sites.

Allowed keys

  • quality — integer 1-100
  • output_formatwebp or avif
  • auto_converttrue / false
  • serve_webptrue / false
  • resize_max_width — integer 320-7680, or 0 to disable

Read

Terminal
$ wp tempaloo settings get quality
85

Write

Terminal
$ wp tempaloo settings set quality 75
Success: Set quality = 75

$ wp tempaloo settings set resize_max_width 2560
Success: Set resize_max_width = 2560
Validation is built in
Out-of-range values are clamped (quality to 1-100, resize_max_width to 320-7680). Booleans accept true/false/1/0/yes/no.