Migrate spoken article data from parent post meta into private spoken-article CPT posts.
When to run
Use this when parent posts still hold legacy keys such as spoken_article, spoken_article_transcript, and related voice/interstitial meta, and you need CPT-backed records.
Command
# Preview
wp prc spoken-article migrate --dry-run
# Apply
wp prc spoken-article migrate
# Apply and remove old parent meta keys
wp prc spoken-article migrate --cleanup
| Flag | Default | Purpose |
|---|---|---|
--dry-run | off | Log actions without writing |
--batch-size=<n> | 50 | Posts per batch |
--cleanup | off | Delete legacy parent meta after a successful migrate |
What it does
For each parent in enabled post types that still has spoken meta, the command:
- Creates a
spoken-articleCPT post when needed - Copies relevant meta
- Moves the transcript into CPT
post_content - Sets the player-enabled toggle on the parent
- Optionally removes old parent meta keys when
--cleanupis set
Source: includes/class-cli-migrate.php.