To all the naysayers who think AI coding is just a bunch of slop and we’re better off just avoiding it, I want to share a story of massive success with agentic coding. This is just one of five examples of similar scale I had in one month.
I’ve been blogging and writing online for just shy of 20 years, incredible. Yes, it’s been on again / off again with gaps here and there. But over the years, I’ve written 199 separate articles. 164 of them were on my older blog hosted under my personal domain on wordpress.com.
I’m a fan of picking whatever tech gets you writing and in the early days that was Wordpress. I know many of us choose a tech that is in a language / framework we work in. But I get plenty of Python coding over at talkpython.fm.
In 2022, I wanted something simpler than Wordpress and Markdown-based so I switched to Hugo hosted right here at mkennedy.codes. Hugo is amazing and it’s been great. But then came the $48/yr renewal once again from Wordpress.com. It’s not a lot of money but am I seriously going to be held hostage for the rest of my life? Maybe. I don’t want those older articles to vanish. But the thought of migrating to Hugo and markdown, including all the linked files and more, was just too much to justify the time and energy. So I’ve been renewing my custom domain fee again and again.
Then I had the thought, “I bet Cursor can migrate the site.” I was sitting around one of the fleeting summer nights recently and thought why not let Cursor and Claude’s Sonnet-4 have a go at it.
I gave it a very clear plan on getting the content from my old domain, migrating the content to markdown in Hugo, and copying and relinking all the binary files and images.
It took us 2 hours to get everything downloaded, rewritten, and converted. But then I had ALL of my content that I had previously seen has trapped completely convert to my current Hugo site! It didn’t happen all at once, but with a bit of iteration, we got it just right.
I even used a separate URL structure for the archived posts: /posts/r/...
rather than just /posts/...
so it’s immediately clear which are the older posts (at least to me).
The last step was to make sure all the old URLs in other sites and search engines still exactly and safely found their way to the new ones. After all, one of my goals is to concentrate the SEO / GenAI-O into one place rather than two domains.
Enter AI again, I asked Claude how to redirect and capture the URLs of the form:
blog.michaelckennedy.net/YYYY/MM/DD/slug
The new format would be:
mkenendy.codes/r/slug
I’m pretty good with NGINX but the comprehensive regex to converted these was more than I wanted to write. So I asked AI how to redirect old URLs to new in NGINX. It has the perfect answer:
# Handle blog post redirects
# Pattern: /YYYY/MM/DD/post-slug/ -> /posts/r/post-slug/
location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" {
return 301 https://mkennedy.codes/posts/r/$4/;
}
For example, give this old Wordpress URL a click:
https://blog.michaelckennedy.net/2018/01/08/a-bunch-of-online-python-courses/
And you’ll land via a SEO-friendly 301 at:
https://mkennedy.codes/posts/r/a-bunch-of-online-python-courses/
Perfect!
Here’s the takeaway: I had this hassle of a split site, most of my articles trapped in the old domain at Wordpress and 3 years of newer ones on Hugo at my current site. I kept getting charged $48/yr just to keep my old links working.
Enter agentic AI: After two fun hours of coding along with Claude Sonnet 4, I had everything unified and brought over to the newer, lighter style and I had my content living again in my new site.
The best part? I just hit delete on my old Wordpress site:
Thanks Claude!