Why I Chose Flat-File Over WordPress for This Blog
After years of building WordPress sites for clients, I went the opposite direction for my own blog. Here is the reasoning, the tradeoffs, and what I gained.
I have spent the better part of a decade building WordPress sites for clients. Custom themes, WooCommerce stores, multisite networks, performance-tuned setups on AWS. WordPress is my bread and butter.
So when it came time to set up my own blog, I did what any reasonable person would do: I ignored WordPress entirely and built a flat-file PHP system from scratch.
The problem with WordPress for a personal blog
WordPress is a content management system for people who need content management. A personal blog does not. I know what my posts look like. I know where they live. I do not need a database, an admin panel, or a plugin ecosystem to write and publish a few hundred words every week.
What I do need is speed. A flat PHP file that returns HTML beats a WordPress page load every time. No database queries. No plugin chain. No object cache layer pretending the problem does not exist. The HTML is the cache.
The architecture
The entire blog is a handful of PHP files:
- A metadata registry (
posts.meta.php) that holds every post's title, description, tags, author, and dates in a plain array. - A
posts/directory where each post is a standalone PHP file containing only the article HTML. - A router (
post.php) that reads the slug from the URL, pulls metadata, loads the post file, and wraps it in a shared header and footer. - A tag page, an RSS feed, and an index page that all read from the same metadata array.
To publish a new post, I create the post file and add one entry to the metadata array. That is the entire workflow.
What I gave up
No visual editor. No media library. No scheduled publishing. No plugin to auto-generate Open Graph images. No search. No comments.
I do not miss any of it. The features I actually use — SEO meta tags, reading time calculation, dark mode, responsive layout — are handled in about 200 lines of PHP and a couple of CDN links for fonts.
What I gained
Speed. Page loads are effectively instant. There is no database round-trip, no autoload chain, no wp_head() dumping 40 lines of meta tags I never asked for.
Control. Every line of HTML that ships is a line I wrote. The markup is clean, the CSS is hand-picked, and I can change anything without worrying about theme compatibility.
Portability. The entire blog fits in a zip file. Upload it to any shared hosting with PHP and mod_rewrite, and it runs. No Composer, no Node, no build step.
Simplicity. The codebase is small enough to understand fully. There is no abstraction I did not choose. If something breaks, there are maybe five files to check.
When you should not do this
If you have multiple authors who need a backend, use WordPress. If you need scheduled posts, content approval flows, or media management, use WordPress. If you are not comfortable writing HTML for every post, use WordPress.
But if you are a developer who wants a fast, clean, fully controlled blog with zero dependencies, a flat-file system is hard to beat. You already know PHP. Use it.
The best architecture is the one where the number of moving parts matches the number of problems you actually have.
For a personal blog, that number is very small.