This blog started out built on WordPress. For some reasons that made sense to me at the time, last year I moved everything over to a platform called Pelican.
Pelican is a static site generator that takes plain text input and converts it to web pages. This is great for a variety of reasons, especially if you like writing in Markdown or want to keep your blog in some kind of source control.
Both of those sounded pretty neat to me and I got tired of WordPress, so I made the jump. I downloaded my WordPress installation, ran a script to convert its posts to Markdown, then tinkered with a few themes and plugins until I had something that looked fairly close to the original.
For a time, things were good. I enjoyed writing in Markdown. It took me back to the “old days” of plain text, scratching out the words without care for how they might appear. There was a kind of magic to the process. Writing, then waiting, then finally seeing the article published. All it took was Notepad++ and a command line and baby, I had a blog going.
Then I took a break. Life got in the way. I finally returned to add new posts, but when it came time to publish I actually forgot for a moment what the damn tool was even called. Then I forgot the command line options. Then I forgot where the output went. Most recently, I tried linking one article to another and this caused the generator to throw new errors. I googled around for about ten minutes before thinking, “I don’t have time for this.”
So instead of fixing that problem I spent an evening restoring WordPress. If you’re curious, here’s how to do it like I did:
- Create a brand new WordPress installation
- Google “export pelican to wordpress”, then wonder if you have your old backup still
- Find the backup *.tar.gz file and poke around its contents
- Upload everything over FTP
- Play Master of Orion while you wait for 3,500+ files to upload
- Update wp-config to point to the new database
- Drop all the tables and recreate them with the old WordPress DB table contents
- Find the functions.php file for your theme and add a few lines of code to programmatically update all mentions of the old URL to the new URL
- Refresh the login page about 5 times
- Log in and update WordPress
- Update hyperlinks in posts
- Copy-paste the Pelican posts into WordPress posts
And voila! It’s like I never left WordPress! Except for all the times I linked to the old old blog, then destroyed them by moving to Pelican, and then destroyed those links by moving again over here. One day I’ll write a redirect so folks following those old links will come here, instead. Another day.