Most website platforms take a database for granted. WordPress needs MySQL or MariaDB. Ghost needs one too. Even many "static" setups quietly bolt a database on for forms, search or comments. But a database is a running service you have to install, secure, back up, patch and pay to host - and for a great many sites, it earns none of that effort.

The good news: you can build a fast, dynamic, maintainable website with no database at all. Your content lives in plain files, pages are generated and cached, and the dynamic features you actually need are handled without a database engine behind them.

What a database usually does - and how to do it without one

A database on a typical site is doing a handful of jobs. Each one has a simpler, file-based answer:

The job The database-free way
Store the content Plain Markdown files in a folder - the files are the source of truth
Render pages dynamically A template engine turns files into HTML on first request, then caches it
Collect form submissions A form handler that delivers to email, a file, or a webhook
Site search A search index built from the content, queried in the browser
News feeds RSS and Atom generated straight from your pages
Structured data / listings A JSON data file the engine reads and renders into pages

Notice what is left: almost nothing that a database is uniquely good at.

How a file-based site actually works

Drop a Markdown file into your docroot. The first time someone visits, it is rendered to HTML and the result is cached next to the source file. Every request after that is served as a plain static file - no process to spin up, no query to run, no database round-trip. Edit the file and the page refreshes; delete it and it is gone. That is the entire model.

Because the served page is static HTML, it is fast, cheap to host, trivial to cache at the edge, and easy for search engines and AI crawlers to read.

What you gain by dropping the database

  • Lower cost. No database server to run means a smaller, cheaper host - often a few dollars a month, or free on hardware you already have.
  • Speed. Cached static HTML has nothing to compute per request. Fast pages help both users and search ranking.
  • Ownership and portability. Your whole site is text files. Move it, back it up with git, or open it in any editor. Nothing is trapped in a database export.
  • Less to break and secure. No database means no database to misconfigure, leak, or get compromised. The most common CMS attacks simply do not apply.
  • Simple backups. Copy the folder. That is the backup.

When you genuinely do need a database

Be honest about the exceptions. A database earns its keep for high-volume user-generated content, a real e-commerce store with live inventory, or complex relational data with lots of cross-referencing and per-user state. For those, use one.

But for a marketing site, documentation, a blog, a portfolio, a directory, a small members' area, or a brochure site - you almost certainly do not. The database is overhead you are paying for capabilities you never use.

Build one now

lazysite is a Markdown-driven website engine built on exactly this idea: drop a .md file in and it is served as a rendered, cached page - no build step, no database, no CMS to maintain. The dynamic pieces (templating, forms, search, feeds, sign-in, even pay-per-read) are built in, so you lose nothing by going database-free.