Flat-file CMS vs WordPress
WordPress, Drupal or Joomla keep every page, setting and user in a database. A flat-file CMS keeps them in ordinary files and folders. That one decision changes how you host, back up, move and secure a website.
How each one works
A database CMS such as WordPress runs PHP on the server and stores content in MySQL or MariaDB. When someone opens a page, PHP asks the database for the content, builds the page and sends it out. Caching plugins can store finished pages to save work.
A flat-file CMS also runs on the server, usually in PHP, but reads content from text files: Markdown, YAML, JSON or XML. A page is a file, a section is a folder. Most systems cache the rendered result, so a request is little more than reading a file.
| Flat-file CMS | WordPress and other database CMS | |
|---|---|---|
| Where content lives | Text files in folders | Database tables |
| Setup | Upload files, open the site | Create a database and user, then run the installer |
| Hosting | Any webspace with PHP; no database needed | PHP plus MySQL or MariaDB |
| Backup | Copy the folder | Files plus a database export |
| Moving to another host | Copy the folder, done | Move files, import the database, fix URLs stored in it |
| Version control | Content and code can live in Git together | Content sits in the database, outside Git |
| Plugins and themes | From a handful to several hundred per system | Tens of thousands |
| Large sites, many editors | Fine up to thousands of pages; heavy concurrent editing is harder | Built for it |
| User-generated content | Limited: comments and forms, rarely more | Shops, memberships, forums and communities |
Advantages of a flat-file CMS
Less to set up and less to break
No database server means no credentials to manage, no connection errors and no database upgrades. Many flat-file systems are a single ZIP you unpack on the server.
Fast by default
Reading a file is cheap, and most systems add their own page cache. For a typical small site you get good speed without tuning or extra plugins.
Backups and moves are trivial
The whole site is a folder. Copy it to a USB stick, another server or a Git repository, and you have a complete backup or a working copy.
A smaller attack surface
There is no database to break into through SQL injection, and the plugin ecosystems are smaller. That does not make a flat-file site secure on its own: you still need updates, strong passwords and correct file permissions.
Content you can read and edit anywhere
Markdown files open in any text editor, can be searched with ordinary tools and are easy for scripts and AI assistants to work with.
Where WordPress is the better choice
- You need a specific plugin: a shop, booking system, membership area or forum. WordPress has far more ready-made extensions.
- Many people edit at the same time, with workflows, approvals and roles.
- Very large sites with tens of thousands of pages, or lots of content created by visitors.
- Agencies and freelancers are easier to find for WordPress, and clients often already know it.
Which one should you pick?
For a personal site, a blog, a portfolio, a small business site or documentation, a flat-file CMS is usually simpler, faster and cheaper to run. For a shop, a community or a site with many editors, start with WordPress or another database CMS.