Retiring Old WordPress Sites

Tom 871 words

Antigravity workspace
Personal Photo · CC BY 4.0

I had three old WordPress blogs that were just decaying out there on the Internet, using up power and space for nothing.

Those three old sites haven’t been updated since somewhere around 2018, so it’s safe to say they weren’t going to suddenly spring back to life. In the development world, we love to build and deploy things, but we rarely think about destroying them when their usefulness has passed. (Trust me, in my day job, I run into this all the time.)

It was time to get rid of them, park those domain names, and redirect all those old links to this site.

This task was somewhat tangentially inspired by a Blaugust post I saw earlier: Re: The Loss of Links Continues | Michael Harley. My internal response to that post was something along the lines of: “You mean, there are people who don’t think about permalinks staying permanent? This has to be explained?”

And then I pondered my own shameful link rot problem. A couple years ago, I tore down my real name blog and replaced it with a Hugo landing page, but I also wiped out all the old permalinks on that domain, so those links have been broken for a while now. It’s bothered me ever since it happened.

It bothered me, but not enough to fix it. The trouble was, it’s a real chore to setup redirections for hundreds of links by hand. But now, with Antigravity’s help, during this Blaugust burst of blog-related productivity, I was able to setup a redirection file to restore those links on my real name domain, so they now redirect here. Far too late, perhaps, but it least it doesn’t bother me anymore.

As for the other three obsolete sites, I set out to create three tiny static sites, consisting of exactly one index.html landing page that says “go to Endgame Viable,” and find a place to host them for free.

Github Pages would have worked, but I discovered that CloudFlare Pages also supports a _redirects file to redirect people going to old links. (I think Netlify also supports it, but I can’t vouch for that.) Undoubtedly there are other options available but I picked CloudFlare Pages almost entirely because I had a CloudFlare account. (Which I honestly don’t remember setting up.)

I asked Antigravity to build a landing page for those three old sites, based roughly on the visual style of the WordPress pages that would be replaced. I tweaked them a little, but not much. How they look doesn’t matter that much to me. The only important thing is that there’s a prominent link to Endgame Viable.

I’ve already imported all the posts from those old sites into Endgame Viable. Since Antigravity has access to all the backup files from the old sites and all the imported files in my current Hugo site, I was also able to get it to automatically create a _redirects file that maps each of the old post permalinks on the old sites to the new url of the imported posts on Endgame Viable.

Then I setup three new git repositories on my github account, and committed those three local directories of files. Which was essentially just two files for each site: An index.html file and a _redirects file. One of them also had an image.

Then I loaded up CloudFlare and found where you add Pages. (Not easy at first, because CloudFlare’s UI seems overly complicated to me.) I added one “application” for each of the three sites, connected each to the appropriate github repo, and enabled it. They were live almost instantly … with temporary development urls.

So I added a custom domain for each of the CloudFlare Pages, and went to my domain registrar and changed the nameservers to point to CloudFlare Pages.

Hopefully by the time this post publishes, the DNS changes will have propagated and the new sites will be live.

Two days later…

It was taking forever to propagate the domain change. But it turned out I had to make some additional changes to the DNS records that I didn’t expect. Once I fixed that, the changes propagated almost instantly, the new static sites were live, and WordPress was gone, forever exorcized from my life.

While I was at it, I changed my real-name site from a single Hugo-built page to a plain static index.html file as well, so I no longer need AWS Amplify to build it. It was a huge waste of compute just for a landing page.

And that was it. Three old WordPress sites killed off in no time, one Hugo site reduced to an index.html . It took a single day. Not counting the waiting time and fixing the DNS records. The Internet now uses just a tiny bit less power thanks to me. We need all the power we can get to keep Antigravity running!

P.S. Right after I created three new github repos, I read this other Blaugust post about github outages and its unsustainable exponential AI-driven growth: GitHub’s growth | Sal’s. It’s me! I’m hastening github’s demise!

Elsewhere: Loading...

Leave a Comment

This is a homegrown DIY comment system I've been working on. It works but technically you're beta testing it. Good luck. Go here to enter a comment on this post without Javascript.