---
title: "Workable jobs WP-CLI commands"
description: "WP-CLI commands for Workable jobs: check the connection, run an import, rebuild job terms and clear the cache with wp wkjb."
source: https://workable.w4dev.com/docs/wp-cli/
---

Workable Jobs for WordPress adds a `wp wkjb` command. Run `wp help wkjb` for the list.

## `wp wkjb status`

Shows where the plugin stands. The access token is never printed, only whether one is set.

| Field | What it holds |
|---|---|
| `subdomain` | Your Workable subdomain, empty when not set. |
| `access_token` | `yes` or `no`. |
| `apply_mode` | `form` (on-site) or `redirect` (to Workable), as it applies right now. |
| `published_jobs` | Jobs listed on your site. |
| `last_sync`, `last_result` | When the last import ran, and `ok` or `failed`. |
| `last_counts`, `last_errors` | What the last import changed, and its errors. |
| `next_sync` | When the next scheduled import runs. |
| `sync_running` | `yes` or `no`. |
| `terms` | `up to date`, `backfill pending` or `backfill running`. |

```
wp wkjb status
wp wkjb status --format=json
wp wkjb status --field=published_jobs
```

## `wp wkjb sync`

Imports jobs from Workable now, like the scheduled import, and prints what changed: `inserted`,
`updated`, `trashed`, `revived`, `orphaned` and `duration_ms`.

It exits with an error when no subdomain is set, another import is running, or the import
recorded an error.

## `wp wkjb terms rebuild` and `wp wkjb terms cleanup`

Both work from the jobs already on your site and never call Workable.

- `rebuild` files every job under its [job terms](/docs/job-archives/) again, then deletes
  empty terms.
- `cleanup` deletes terms no published job uses. Terms you hid, renamed or described are kept.
  The same cleanup runs after every import without errors.

Both refuse to run while an import or another rebuild is running. `cleanup` also waits until
the terms have been built once.

## `wp wkjb cache clear`

Deletes every cached Workable response, like **Clear cache** under
[**Workable → Settings → Tools**](/docs/settings/#tools-test-import-and-clear-cache). Jobs are
not touched.

## `wp wkjb indexing`

Status, log, sending and testing for Google Indexing. See
[the Google Indexing commands](/docs/google-indexing-api/#wp-cli-commands-for-google-indexing).

## Output formats

`status` and `sync` take `--format=table|json|csv|yaml` and `--field=<field>`, which prints one
value. With `--format` other than `table`, standard output holds only the data, so scripts can
parse it.