Greenhouse jobs WP-CLI commands
WP-CLI commands for Greenhouse jobs: check the connection, run an import, rebuild job terms and clear the cache with wp ghjb.
On this page
Greenhouse Jobs for WordPress adds a wp ghjb command. Run wp help ghjb for the list.
wp ghjb status
Shows where the plugin stands. The Job Board API key is never printed, only whether one is set.
| Field | What it holds |
|---|---|
board_token | Your Greenhouse job board token, empty when not set. |
api_key | yes or no: whether a Job Board API key is saved. |
apply_mode | form (on-site) or redirect (to Greenhouse), as it applies right now. |
apply_mode_setting | The Applications setting it comes from: auto, form or redirect. |
published_jobs | Published jobs on your site. |
last_sync, last_result | When the last import ran (never before the first), and ok or failed. |
last_counts, last_errors | What the last import changed, and its errors. |
next_sync | When the next scheduled import runs, or not scheduled. |
sync_running | yes or no. |
terms | up to date, backfill pending or backfill running. |
schema_missing_location | Published jobs whose page prints no JobPosting data because they name no location Google accepts, such as a “Remote - Europe” job with no office address. Above 0, a warning follows; each job’s Greenhouse data box says what to add. |
wp ghjb status
wp ghjb status --format=json
wp ghjb status --field=published_jobs
wp ghjb sync
Imports jobs from Greenhouse now, like the scheduled import, and prints what changed: inserted,
updated, trashed, revived, orphaned and duration_ms.
It exits with an error when no board token is set, another import is running, or the import recorded an error. Each error is printed as a warning first.
wp ghjb terms rebuild and wp ghjb terms cleanup
Both work from the jobs already on your site and never call Greenhouse.
rebuildfiles every job, trashed ones included, under its job terms again, then deletes empty terms.cleanupdeletes 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 a term rebuild is running. cleanup also waits until
the terms have been built once.
wp ghjb cache clear
Deletes every cached Greenhouse response, like Clear cache under Greenhouse → Settings → Tools. Jobs are not touched.
wp ghjb indexing
Status, log, sending and testing for Google Indexing. See the Google Indexing commands.
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.