Move WordPress posts into MDX files
Pauline used Claude Code to pull a WordPress archive into MDX and sort it into year folders.
- What they did
- Pauline asked Claude Code, working as a terminal-based agent, to take every post from her WordPress REST API, turn the content into MDX with frontmatter, and place the files into folders organized by year. It dealt with API limits, transformed HTML into Markdown, and retried after an encoding problem interrupted the script. Pauline supervised the process and checked the results while focusing on other work.
- How it went
- The transfer finished in roughly 4 hours and covered 367 posts plus 5 pages. Older entries with malformed image tags caused the build to fail, and Claude repaired those issues in bulk using a regex-based pass over the directory.
- Tips
- Legacy WordPress content often includes broken markup, so expect a few build failures during conversion. It helps to let the agent read the errors and apply fixes across the whole set instead of handling each file one by one.
Try it yourself with Claude Code
Collect all posts and pages from [WordPress site URL] using the REST API, convert each entry into an MDX file with frontmatter for [title/date/slug/tags/other fields], and save the files in [folder path] grouped by year. If you run into rate limits, encoding issues, or build errors from old HTML, stop and tell me what failed. Before any irreversible action like overwriting, deleting, sending, or submitting, show me the proposed change and wait for my approval. Finish by reporting how many posts and pages you converted and which items still need manual cleanup.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
1 more report of this
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Build a lean skill layer from CLI help output
A developer swapped token-heavy Jira and GitLab MCPs for Markdown-based skills generated from the Atlassian and GitLab CLIs.
Have Claude Code refactor code while you step away
A developer left Claude Code alone on a refactor for 40 minutes, then confirmed the change by checking the tests and the diff.
Use a browser agent to find and fix UI bugs
A frontend developer uses a browser agent and a coding agent together to spot UI issues, trace them in Chrome, and patch the code.
Scan commits for security bugs before they land
Use Claude Code to inspect each commit for secrets, injection flaws, and migration risks before it reaches the repository.
Coordinate coding work through one Claude hub
A developer turned Claude into a control point for Claude Code and Codex, so they could spread work and usage across accounts.
Let Claude Code text you only when it needs help
A solo SaaS founder let Claude Code handle most coding and interrupt them by Telegram only for decisions, errors, and approvals.