Greenhouse jobs WP-CLI commands

View as Markdown

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.

FieldWhat it holds
board_tokenYour Greenhouse job board token, empty when not set.
api_keyyes or no: whether a Job Board API key is saved.
apply_modeform (on-site) or redirect (to Greenhouse), as it applies right now.
apply_mode_settingThe Applications setting it comes from: auto, form or redirect.
published_jobsPublished jobs on your site.
last_sync, last_resultWhen the last import ran (never before the first), and ok or failed.
last_counts, last_errorsWhat the last import changed, and its errors.
next_syncWhen the next scheduled import runs, or not scheduled.
sync_runningyes or no.
termsup to date, backfill pending or backfill running.
schema_missing_locationPublished 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.

  • rebuild files every job, trashed ones included, under its job terms 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 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.

Give every Greenhouse job a page on your own site.

Job pages with Google for Jobs markup, search and filters, and on-site applications. $69 a year for one site.