Snippet
Idempotent WP seeder runner
A reusable seeder runner for converting HTML templates → WordPress DB. Auto-token resolver, taxonomy linking, idempotent slug match.
A reusable, idempotent seeder runner for turning static HTML templates into WordPress DB content — safe to run repeatedly without creating duplicates.
What’s in it
A seeder-runner.php with a seed_once($key, callable) ledger pattern: each step records completion in an option, skips if already done, and is wrapped in error handling. Includes an example that creates a page by slug only when absent.