Technical
Migrating a WordPress Site with AI: The Pattern That Worked
I moved a ten-year-old WordPress site to a new host last month. Three hundred posts, custom shortcodes, a broken taxonomy, and a child theme no one had touched since 2019. Done in two days, mostly hands-off. The pattern I used is repeatable, and it is the most agentic work I have shipped all quarter.
The Setup
I ran Claude Code locally against a fresh checkout of the old site's files. I gave it read access to the export XML and write access to a staging WordPress running in Docker. The job was simple to state: clean the content, migrate the taxonomy, rebuild the theme on a modern base.
The Three-Phase Flow
Phase one was pure analysis. Claude inventoried every post, classified content types, flagged broken shortcodes, and produced a CSV of issues. No writes, just reconnaissance. I reviewed the CSV over coffee and corrected three or four misclassifications by hand.
Phase two was the migration. Claude worked through the CSV, transforming shortcodes into Gutenberg blocks, consolidating the taxonomy, and writing each post to the staging site. After every batch of 20 posts it paused so I could spot-check the output. Anything I flagged got a correction that applied to all similar items.
Phase three was the theme rebuild. Claude converted the old child theme to a block theme, preserving the visual design but swapping the underlying mechanics. That part needed the most human review.
The Control Pattern
The key was the batch-and-review cadence:
for each batch of 20 posts:
agent migrates batch
agent writes migration log
human reviews 3 random samples
human approves or requests fixes
fixes propagate to remaining batchesThat cadence kept me in the loop without making me babysit every post. Error correction happened once per pattern, not once per instance. That is where the speed came from.
What Broke
Two things surprised me. First, agents are bad at spotting silent data loss. A shortcode converted to a block that renders nothing looks fine until a user notices a missing section. I added a render test to catch that.
Second, the theme rebuild needed more human input than I expected. Visual design is still hard to verify from code alone. I ended up doing side-by-side screenshots for every template.
The WordPress block editor handbook is worth reading before starting.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read