FlatPhile

Guides

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 CMSWordPress and other database CMS
Where content livesText files in foldersDatabase tables
SetupUpload files, open the siteCreate a database and user, then run the installer
HostingAny webspace with PHP; no database neededPHP plus MySQL or MariaDB
BackupCopy the folderFiles plus a database export
Moving to another hostCopy the folder, doneMove files, import the database, fix URLs stored in it
Version controlContent and code can live in Git togetherContent sits in the database, outside Git
Plugins and themesFrom a handful to several hundred per systemTens of thousands
Large sites, many editorsFine up to thousands of pages; heavy concurrent editing is harderBuilt for it
User-generated contentLimited: comments and forms, rarely moreShops, 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

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.