Migrating from WordPress to Astro with Claude Code
This Christmas, I gave my website a gift: freedom from WordPress.
For years, I ran a full WordPress site with a custom theme. It worked well, but WordPress had become overkill for a simple blog and portfolio. The maintenance, security updates, plugin management, and hosting complexity were getting in the way.
I wanted something simpler and faster. Something ready for working with AI. So I used Claude Code to migrate everything to Astro with local Markdown files.
Why Markdown and Astro
Markdown is AI-native. It’s simple text that AI can easily read, write, and change. No database queries, no API calls, no proprietary formats.
When your content lives as Markdown files in a Git repository:
- Version control is built-in. Every change is tracked. You can roll back, branch, and merge content just like code.
- No external dependencies. No database, no server, no CMS to maintain. Just static files that deploy anywhere.
- AI can work directly with your content. When content is Markdown in your codebase, AI coding assistants can create, edit, and manage posts without friction.
The migration process
Here’s how Claude Code handled the migration in a single session:
1. Export and analyze
I exported my WordPress content as an XML file and added it to my project. Claude Code analyzed the structure and found 24 cases, 149 thoughts, and 4 pages.
2. Write a conversion script
Claude Code wrote a Node.js script to parse the WordPress XML and convert HTML to clean Markdown. The script:
- Extracted titles, dates, descriptions, and categories
- Converted HTML content to Markdown
- Generated frontmatter for Astro Content Collections
- Created organized
.mdfiles in the right directories
3. Build the new site
Claude Code set up Astro with Content Collections, configured the schemas, and built all the components and layouts. The result is a fast static site that deploys to Vercel in seconds.
4. A fresh start
No more MySQL database. No more PHP. No more plugin updates. Just a clean Git repository with everything I need.
Total time: Under an hour.
A migration that would have taken me a full day was done by AI while I reviewed the results.
What this enables
This migration is not just about simplifying hosting. It’s about preparing for an AI-first workflow.
Creating content is now a conversation. I can tell Claude Code to write a blog post about something, and it creates the Markdown file directly in my content folder. This post you’re reading was created exactly that way.
Editing is seamless. Need to update a post? AI can read the file, understand the context, and make changes. No CMS login, no web interface.
Everything deploys together. Content and code in one repo, one build, one deployment. Vercel picks it up automatically.
The bigger picture
We’re moving into an era where the tools we choose should be AI-compatible by design.
WordPress is powerful, but its complexity creates friction for AI assistance. Databases, PHP, plugins, and themes add layers that AI has to work around. Markdown files are the opposite: transparent, simple, and suited for AI collaboration.
If you’re building a blog or portfolio in 2025, consider:
- Astro for the framework (fast, flexible, content-focused)
- Markdown for content (AI-native, version-controlled)
- Git for storage (collaborative, transparent)
- AI coding assistants for creation and maintenance
The combination works better than any of these alone.
Try it yourself
If you’re on WordPress or another CMS, the migration might be easier than you think. Export your content, describe what you need to an AI coding assistant, and let it handle the conversion.
The hardest part is deciding to make the change. The actual work? AI has that covered.
This post was written on Christmas Day through a conversation with Claude Code. I’m using AI to write about using AI. That’s the point. This is what an AI-first content workflow looks like.
Welcome to the future of blogging.