I haven't opened the WordPress dashboard to write a post in a long time. The last few times WordPress was on my mind, it was because another security alert had landed. Sometimes it was about PHP 2 Shell, sometimes WordPress itself needed a security update, and a few days later it would be a plugin's turn.

Every alert meant finding time to check whether my site was affected. I'd install the updates it needed, then open the homepage and click through a few posts to make sure everything still worked. AI can look things up, read logs, and even upgrade PHP for me, but I still have to keep track of new vulnerabilities as they come in. As AI agents get better at automated security testing and red teaming, I started asking myself whether my personal blog needed WordPress running around the clock.

I'd already moved my writing workflow out of the dashboard. For both my WeChat Official Account and my blog, I use AI to draft posts and have it publish them through an API. I rarely need the WordPress dashboard, yet PHP, the database, and the plugins still need upkeep. Readers usually come for posts, photos, and travel maps, all of which I can serve on static pages.

So I asked AI to help turn the blog into a static site. Once a post is ready, GitHub Actions builds the pages and uploads them to Alibaba Cloud OSS. Readers still use the same domain, with the site served through a CDN. That also saves me the overhead of keeping PHP and a database running for the public site.

How the static blog is published and served

Start small, then move the whole site

I wanted readers' old bookmarks to keep working, the Chinese and English versions to switch as before, and the routes on the travel page to stay visible. We started with a sample of 22 routes, kept the pages WordPress had already rendered, and had AI write templates for new posts. Once the sample pages and travel map worked, we moved on to the full site.

In all, we migrated 133 public posts and kept 521 legacy URL mappings. Old photos and videos took the most time. Some external links had stopped working, so we looked through the upload directory, backups, and public archives. When we found a copy, we saved it on the new site. When we couldn't, we left a note in the original spot. Before going live, we blocked external requests and used a local HTTP server to check the pages, feeds, and old URLs.

After the switch, I browsed the site like a reader

We started on the sample on November 29. Two days later, all public traffic was going to OSS. After we switched to 100%, opening the blog homepage returned an XML response saying AccessDenied. Adding /index.html to the domain brought up the homepage just fine.

We used that difference to check which path Alibaba Cloud ESA was requesting from the origin. The homepage was soon accessible again.

The English blog homepage after the migration

For this post, I can write the text in the repository, add the Chinese and English details and a cover, then let GitHub Actions build and deploy it. I used to set aside time every few days for WordPress updates. Now I get to spend that time writing.