Skip to content
Gaurav TiwariDocs

WP-CLI Commands

Updated October 22, 2026

Reminders that arrive late, a cron job you need on a quiet site, a quick count of last month’s cancellations: these are faster from a terminal than from wp-admin. Core Bookings adds its commands under wp core-bookings, and they use the same rules and validation as the screens.

Who the Commands Run As

Without --user, commands act as the site operator with full access. WP-CLI already has the database, so a permission check would protect nothing. With WP-CLI’s global --user=<login>, a command keeps that user’s scope and stops if the user lacks the permission:

  • appointments list needs staff access. Staff see only their own appointments.
  • appointments export needs export permission.
  • services, customers and checks need booking-manager access.

Workers and Health

CommandWhat it does
wp core-bookings jobsRuns the booking worker once: emails, reminders, payment checks, webhooks and other queued work.
wp core-bookings calendarRuns the calendar worker once: external calendar checks and conflict detection.
wp core-bookings doctorPrints redacted JSON: version, schema, staff and service counts, failed jobs and the last worker run.
wp core-bookings checks [--format=<format>]Shows the setup checks of every switched-on module (module, check, ok, detail). Formats: table, csv, json, yaml.

WordPress cron only runs when the site gets visits, so on a quiet site reminders can run late. Run both workers from system cron every minute:

* * * * * wp --path=/absolute/path/to/wordpress core-bookings jobs
* * * * * wp --path=/absolute/path/to/wordpress core-bookings calendar

A database lock stops two workers from processing the same queue at once, so an overlap is safe.

Modules

wp core-bookings modules list
wp core-bookings modules enable classes
wp core-bookings modules disable messaging

Module IDs: microsoft, calendar_feeds, questions, teams, locations, resources, staff_portal, messaging, automations, insights, promotions, payment_rules, gateways, taxes, classes, memberships, reviews, integrations and abilities. Switching one on here works like the switch in Bookings → Settings → Modules.

Appointments

appointments list and appointments export share the workspace filters:

OptionValues
--statusconfirmed, awaiting_approval, awaiting_payment, awaiting_claim, payment_review, completed, no_show, cancelled, expired
--filterupcoming, future, booked, awaiting_payment, needs_attention
--days7 or 30, for --filter=upcoming
--service, --staffService ID, staff user ID
--from, --toStart dates as YYYY-MM-DD in the site timezone, inclusive. Invalid dates stop the command.
--searchCustomer name or email contains this text

appointments list also takes --limit (1 to 5000, default 100), --fields and --format (table, csv, json, yaml, count or ids). Fields: id, start, start_utc, end_utc, service_id, service, staff_id, staff, name, email, seats, status, payment, total, currency.

appointments export writes the same CSV as Export bookings CSV in the workspace, to standard output or to --file=<path>. Replacing an existing file needs --force.

wp core-bookings appointments list --filter=upcoming --days=30 --format=json
wp core-bookings appointments list --status=cancelled --from=2026-11-01 --to=2026-11-30 --format=count
wp core-bookings appointments export --service=5 --file=/tmp/november.csv
wp --user=alex core-bookings appointments list --format=ids

Services and Customers

CommandWhat it does
services list [--all] [--fields] [--format]Active services, or every service with --all. Fields: id, title, active, mode, duration, price, payment, staff, url.
services create --title=<title> --staff=<ids> [--inactive] [--porcelain] [--<setting>=<value>]Creates a service with the service editor’s validation. --porcelain prints only the new ID.
customers list [--search] [--limit] [--fields] [--format]Customer profiles, newest first. Fields: id, email, name, user_id, bookings, created.

For services create, settings use the service editor’s keys, such as --duration=60 --interval=15 --price=5000 --payment=offline. Prices are in minor units (5000 is 50.00). --staff and --occurrences take comma-separated lists, --approval, --waitlist and --auto_staff accept yes or no, and each staff member needs an active staff profile. The service’s history records “Created with WP-CLI”.

wp core-bookings services create "--title=Intro call" --staff=3 --duration=20 --payment=free --porcelain

Moving a whole site is a job for Import / Export, not the CLI. If a worker keeps failing, start with Troubleshooting.

Share

Was this helpful?

Still stuck? Open a support ticket