FleetWP Docs
Developers

CLI

Manage your WordPress fleet from the terminal or CI with the zero-dependency fleetwp CLI.

@fleetwp/cli is a zero-dependency Node CLI (Node 18+) that wraps the REST API.

Install

npm install -g @fleetwp/cli

Or run it directly without installing:

npx @fleetwp/cli sites list

Configure

Set two environment variables:

export FLEETWP_URL="https://app.fleetwp.io"   # optional, this is the default
export FLEETWP_TOKEN="fwp_your_token_here"

Commands

fleetwp <command> [args] [--json]

  sites list                       List all sites
  sites get <site-id>              Show one site
  backup list <site-id>            List a site's backups
  backup create <site-id> [--type full|db|files]
  backup create --all              Back up every site
  update <site-id> [--plugins a,b] Apply updates
  login <site-id>                  Print a one-click admin login URL
  activity [--limit N]             Recent workspace activity

Add --json to any command for machine-readable output — handy in CI.

Examples

# List sites as a table
fleetwp sites list

# Back up every site (nightly cron job)
fleetwp backup create --all

# Update only two plugins on one site
fleetwp update 1a2b3c --plugins akismet,woocommerce

# Get a login URL as JSON
fleetwp login 1a2b3c --json

Batch commands like backup create --all catch per-site errors so one failing site doesn't abort the run.

On this page