Migrate WordPress posts to MDX
Claude Code pulled posts from the WordPress REST API and converted them to MDX with frontmatter, migrating 367 posts and 5 pages in one session.
What they did
Pauline gave Claude Code, running as a terminal agent, one goal. It was to extract all posts from her WordPress REST API, convert them to MDX with frontmatter, and save them into year-based folders. It handled API rate-limiting, turned the HTML into Markdown, and re-ran its script after an encoding error. She says she directed and reviewed while doing other things.
How it went
All 367 posts and 5 pages moved to local MDX in one afternoon, which she puts at about 4 hours. Old posts with broken image tags stalled the build, and Claude fixed them with a regex across the directory.
Worth knowing
Expect build failures from messy legacy HTML, such as broken image tags. Let the agent read the build errors and fix them in bulk.
Labels
Old posts with broken image tags stalled the build, and Claude fixed them with a regex across the directory.
It was to extract all posts from her WordPress REST API, convert them to MDX with frontmatter, and save them into year-based folders.
It was to extract all posts from her WordPress REST API, convert them to MDX with frontmatter, and save them into year-based folders.
It handled API rate-limiting, turned the HTML into Markdown, and re-ran its script after an encoding error.
She says she directed and reviewed while doing other things.
The “Material” label failed its quality check and is not used for selection.
Details
- Agents
- Claude Code
- Source
- other
- Source date
- undated
- Accounts
- 2
- In registry since
- Oct 12, 2026