After the recent press around Automattic and WP Engine I decided to go ahead and abandon the Wordpress ecosystem entirely. I haven’t been thrilled with Wordpress for a while and the controversy was sort of the straw that broke the camel’s back. This post has some details about how I moved away from Wordpress.com.
Challenge
I have a very old website. It’s been indexed by search engines and linked to in all kinds of strange places. Cool URIs don’t change. I don’t want to break those old links, but moving away from wordpress.com means I need to be able to direct users to the new location. The solution to this problem is pretty boring but I thought I’d share it anyway.
0. Own your content’s domain
I cannot control what happens to wordpress.com content. I completely control what technology I decide to use for domains that I personally own. My old website’s URL was virtualandy.wordpress.com
, and my freedom to do what I choose with that content is limited to what Automattic provides. Automattic does not provide HTTP redirects. :(
Since I own ahill.net, I can choose to use whatever technology I want and easily make whatever changes I see necessary- no third party involved.
1. Moving the content
I used a wonderful tool called wp2hugo to set up the new site. wp2hugo
was simple to configure and move the content from a Wordpress.com provided XML export to hugo. The only thing I was not thrilled about with wp2hugo is the site’s new template. I’ll be able to make some changes to that in the future.
2. Replace all existing content
Since virtualandy.wordpress.com
is linked in all sorts of places and I don’t want to break those links, I needed to update all ~100 posts on my site by replacing the content with a note saying that the site’s content has moved to another location.
The first place I looked was the Wordpress.com bulk editor. It doesn’t allow content to be replaced. In my 2024 wisdom, I decided to ask ChatGPT and it helped me understand that Wordpress.com has an API. By writing some code to interact with that API, updating all of the posts becomes trivial. Take a look at my wp-dotcom-exit repository which has the mostly-ChatGPT-generated code that performed the site updates.