The Pegasus Daily is now on Ghost! I used to use Ghost for a while back in 2014, but somehow I defected to WordPress soon afterwards. What I loved about Ghost back then was probably Markdown support and its overall snappiness, but setup was slightly more non-trivial compared to a WordPress install. As you can see, the site in its current state is functional but far from awesome; I guess the black splash image is capable of killing the mood for nearly all my would-be readers.
The migration process was convoluted: I had to use a three-year-old plugin (most likely the only one) to export my posts as a single JSON, and due to its age, it only supported the Ghost 1.x JSON format (I see what you did there, Semantic Versioning 😒). Over the past few months I've really grown to like containers, so I spun up a Ghost 1.x Docker container, set up the site, and imported the JSON export. That was relatively painless as I could immediately see all my posts, including all my drafts (most of them have been sitting for almost a year!). The upgrade to Ghost 2 was also uneventful.
After a few days (i.e. today), I decided to proceed with the migration. It was all smooth sailing before I was asked of the MySQL (well, MariaDB actually) root password. I couldn't find it, but it later turn out that my password was empty (!). After encountering a few syntax errors, I managed to set a new password and continued with the ghost-cli tool. Prior to installing Ghost, I stopped nginx and deactivated my original site config as the installer was also requesting a SSL certificate from Let's Encrypt. However, the acme.sh step failed when I first tried it. The error wasn't specific, so I thought it was a permission thing. After three more failures, I became cautious (since LE has rate limits and I've hit those limits before) and set out to reproduce the problem. It was Cloudflare. I don't know whether it was my crypto settings or that nginx was spewing 502s and Cloudflare doing its job and showing its error pages. Anyway, I disabled Cloudflare and tried requesting the certificate again. Nope - DNS propagation shenanigans. After yet another couple of minutes I tried again, and it finally worked. I re-enabled Cloudflare and began to set up the site.
All my media files was on the same domain as the site, so I didn't have a lot of room to work with. I initally thought the nginx-root/ folder was where the assets are stored, so I moved my wp-content folder there - nope. I dug a bit and found this:
# Used for acme.sh SSL verification (https://acme.sh)
I resorted to spinning up a new vhost and put my media folder under a different subdomain - https://cdn.ruijie.me (click me! 🦄️). The rest was easy, a replace on the Ghost 2 export file to fix the media file, a import, and that was basically the site as it appears now. It's getting kinda late, so I'll just call it a day and work on the site later.
- fix redirects
- eventually: move to a container