This site ran on WordPress for years. When I finally looked at what was actually on it, the list was short: one blog post from 2019, an About page and a contact form. On top of that: a database, PHP, a theme, a pile of plugins and a constant round of updates just to keep it all secure.
None of that made sense. A site that changes a few times a year doesn't need a server that rebuilds every page for every visitor.
What replaced it
The new site is built the same way as the Mobali website:
- React Router 7 in framework mode with
ssr: false. Every page is prerendered to a static HTML file at build time, and there is no server in production at all. - Posts are markdown files in a git repo. A new post is one new file and a
git push. - Cloudflare serves the built files directly — no database, no login, no plugins to update.
- The RSS feed and sitemap come out of the same build, straight from the posts.
The list of pages is explicit. The prerender config reads the posts from disk, so a new file ends up on the site without touching anything else:
export default {
appDirectory: 'src/app',
ssr: false,
prerender() {
const pages = Object.values(PAGES).flatMap((paths) => LANGS.map((lang) => paths[lang]));
const posts = LANGS.flatMap((lang) =>
readdirSync(`content/blog/${lang}`)
.filter((file) => file.endsWith('.md'))
.map((file) => postPath(lang, file.replace(/\.md$/, ''))),
);
return [...pages, ...posts, ...LANGS.map(rssPath), '/sitemap.xml'];
},
} satisfies Config;
Two languages
The site is now in both Finnish and English. Finnish lives at the root and English under /en. A post doesn't have to be translated, but when a translation exists, both versions share the same translationKey. The language switch then goes straight to the translation, and search engines get the right hreflang links. This post is the first such pair.
Old URLs
WordPress URLs looked like /2019/06/13/post-title/. Breaking them isn't an option, so every old address gets a permanent (301) redirect to its new home. Unknown URLs return a real 404 instead of the home page, because a so-called soft 404 is bad news for search engines.
The result
The site loads faster, needs no maintenance and has no attack surface to worry about. And while I was at it, the design finally made it into this millennium.