WP-CLI Cheatsheet
Run WP-CLI against the id86.net WordPress install. All commands assume the WordPress path /home/Dmg59ZFtKg6bIws1/id86net/public_html (the sudo user wrapper sudo -u Dmg59ZFtKg6bIws1 -- wp --path=... on GC-US-M10).
Posts & Meta
| Task | Command |
|---|---|
| Get post by ID | wp post get <id> |
| Get post URL | wp post get <id> --field=url |
| Set publish date (date-only) | wp post update <id> --post_date='2026-08-10' |
| Get custom meta | wp post meta get <id> <key> |
| Update custom meta | wp post meta update <id> <key> <value> |
| Delete custom meta | wp post meta delete <id> <key> |
| List posts by slug | wp post list --post_type=post --name=<slug> --fields=ID,post_title,post_status |
| Trash a post | wp post delete <id> |
| Force delete a post | wp post delete <id> --force |
Caches
| Task | Command |
|---|---|
| Purge LiteSpeed targeted (one URL) | curl -ksS --resolve id86.net:443:127.0.0.1 "https://id86.net/<slug>/?LSCWP_CTRL=PURGESINGLE" |
| Purge LiteSpeed full (structural) | curl -ksS --resolve id86.net:443:127.0.0.1 "https://id86.net/?LSCWP_CTRL=purge_all" |
| Flush PHP OPcache | wp flush-opcache flush |
| Rebuild Fuse.js search index | wp fusejs generate-index |
LiteSpeed:
wp litespeed-purge allis blocked by Cloudflare Access (no-op). Use the origin-direct forms; default is targeted per URL. See LiteSpeed Cache CLI.
ID86 Meta Keys
| Meta Key | Purpose |
|---|---|
_id86_doc_id | Stable document identifier from frontmatter id |
_id86_source_path | Repository-relative source path (post matching) |
_id86_source_hash | SHA-256 of file (change detection) |
_id86_content_type | Content-type badge. Registered values: cheatsheet/reference/checklist/glossary/prompt/snippet/pattern/template/runbook/other. Set via the editor's Content Type metabox or wp post meta update <id> _id86_content_type <value>. Sync defaults to reference only when the meta is empty (manual choices are preserved) |
post_views_count | Incremented per view (popular-post query) |
Options
| Task | Command |
|---|---|
| Get an option | wp option get <name> |
| Update an option | wp option update <name> <value> |
| Delete an option | wp option delete <name> |
| Patch a nested option | wp option patch update <name> <key> <value> |
Examples:
wp option get id86_reoon_api_key
wp option update id86_reoon_api_key "$(source ~/.ssh/reoon/.env && printf '%s' "$REOON_API_KEY")"
SEOPress
| Task | Command |
|---|---|
| Export settings | wp seopress settings export --destination='.../uploads/seopress' |
| Import settings | wp seopress settings import --from='.../uploads/seopress' |
| Post SEO title | wp post meta update <id> _seopress_titles_title "..." |
| Post SEO description | wp post meta update <id> _seopress_titles_desc "..." |
| Generate AI metadata | wp seopress ai metadata --id=1,2,3 --meta=desc --language=en_US |
| Generate AI alt text | wp seopress ai alt_text --id=1,2,3 --language=en_US |
| License activate | wp seopress-pro license activate --key=YOUR_LICENSE_KEY |
| License status | wp seopress-pro license status |
SEO title/description meta is written automatically by the sync pipeline on every create/update — the commands above are for manual override/verification only. See SEO Metadata Automation.
Cron
| Task | Command |
|---|---|
| List cron events | wp cron event list --fields=hook,next_run_relative,status |
| Run due events now | wp cron event run --due-now |
Notes
- WordPress auto-converts a post with a future
post_datetofuturestatus and publishes it when the scheduler runs — this is how frontmatterdateschedules posts. - Post date accepts date-only (
YYYY-MM-DD); time defaults to00:00:00. - Never expose secrets via
wp option getoutput in logs or screenshots.