Claude Code actually handled a WordPress to Next.

Sam64 Advanced 2d ago 539 views 1 likes 2 min read

Most "AI coding" experiences are just glorified autocomplete, but I put Claude Code to the test on a project I'd been procrastinating on for years: ditching WordPress. I was tired of paying $70+ a year for a platform that breaks code block styling every time I touch the dashboard and forces me to manually convert content to Markdown just to cross-post to dev.to.

I decided to move everything to Next.js and deploy via Netlify. Here is the catch: I have almost zero experience with Next.js. I wanted to see if an LLM agent could actually manage a deployment from scratch without me spending a week in the documentation.

The technical hurdle

The migration wasn't just a copy-paste job. I had over 70 posts, many containing complex LaTeX for math and engineering that needed to be converted to KaTeX. I also needed to maintain my existing URL structure to avoid a total SEO meltdown.

Claude Code actually handled a WordPress to Next.

I delegated the heavy lifting to Claude Code. Specifically, I tasked it with:

  • Building the Next.js components and routing from the ground up.
  • Scraping my old WordPress URLs and converting the HTML content into clean Markdown files in /content/posts.
  • Configuring remark and rehype to ensure the Markdown rendered correctly as HTML.
  • Standardizing code block indentations to 2 spaces and converting WordPress-specific language tags.
  • Parsing my WordPress sitemap to extract "last modified" timestamps and injecting them into the Markdown front matter so the new Next.js sitemap would be accurate.
Claude Code actually handled a WordPress to Next.

Performance breakdown

Claude Code actually handled a WordPress to Next.

Since I usually benchmark these models, I was looking for where the logic would fail. Here is how the workflow played out:

  • Context Handling: Surprisingly strong. I fed it a list of URLs and it systematically visited each one, extracted the content, and formatted the front matter without losing data.
  • Code Accuracy: The remark and rehype configurations were spot on. Usually, getting LaTeX to render correctly in a static site generator is a nightmare of dependency hell, but the agent nailed the config.
  • Autonomy: This felt more like a real LLM agent than a chat interface. Instead of me writing the code and pasting it, the agent was interacting with the filesystem and the web directly.

The most impressive part was the prompt I used to trigger the bulk migration:

Claude Code actually handled a WordPress to Next.

Please convert the blog posts from the following sites into Markdown files in the folder `/content/posts`.

- https://crunchingnumbers.live/2016/01/24/monte-carlo-simulations-craps/
- https://crunchingnumbers.live/2016/01/28/monte-carlo-simulations-penneys-game/
- ...
- https://crunchingnumbers.live/2019/07/03/topics-in-computational-mechanics-part-3/

For anyone still clinging to a bloated CMS, this is a practical tutorial in how to use an AI workflow to modernize your stack. It turns out the "hard part" of migration—the tedious data cleaning and regex work—is exactly what these agents are best at. It didn't require a complex prompt engineering strategy; just clear instructions and a list of targets.

nextjs

All Replies (3)

C
CameronCat Intermediate 2d ago
Don't forget to double-check the redirects, otherwise your SEO will tank during the move.
0 Reply
G
GhostFounder Intermediate 2d ago
Did it handle the custom post types well or did you have to map those manually?
0 Reply
C
CameronOwl Expert 2d ago
Used it for a similar migration last month; surprisingly decent at mapping complex CSS layouts.
0 Reply

Write a Reply

Markdown supported