The flat file CMS: flat hierarchies for faster access

A relatively new variant of content management systems is now competing with traditional CMSs such as WordPress, Typo3, and Drupal. It is based on the idea of so-called flat files: files with a very simple structure. These flat file systems have both advantages and disadvantages compared to their major competitors. In the following article, we explain how flat file CMSs work and give a short overview of the different systems that are already available.

What are flat files?

The simplest flat file you can imagine is a text file in TXT format. It contains only written content, without any links, indexes, or formatting. The same applies to binary files, since the code is also simply written down. These files are also the basis for the simplest databases. Flat file databases fit into a single file. They are very different to complex relational databases, where the data sets have links, indexes, hierarchies, and predefined formats. Flat file databases don’t have any of these – they are the digital equivalent of a shopping list or punch card. For databases like these, a wide variety of plain text and binary formats can be used. A well-known example is CSV files (comma-separated values): information within a data set is separated from each other with commas, the data set itself is terminated with a line break – no hierarchy, just a simple list.

The advantage of flat files is their simple structure: Since the data isn’t linked, it can be created very quickly with fewer sources of error due to the low complexity. Flat file CMSs also make use of this principle and therefore offer an interesting counterbalance to the heavyweight traditional content management systems.

How do flat file CMSs work?

All major, well-known content management systems use MySQL or similar database management systems in the background. The database management systems (short: DBMS) operate in relation to each other i.e. they work with several tables to organize queries. To do this, they need an extra equipped server. A flat file CMS completely forgoes database management, which is why it is often referred to as a CMS without a database. The DBMS is no longer needed, and neither is the server.

Instead, the CMS is based on a common folder structure: web masters upload the files (HTML/PHP, multimedia, and text files) only onto the server. Afterwards, the website is practically ready for use. The queries go directly to the files and are not distributed over MySQL. For example, developers store access data for each user in a separate YAML file. By naming the file, it enables the CMS to find the corresponding data. Content can also be created in the same way: In principle, the idea is that flat file CMS users simply create a text or markdown file for each blog post and store it in the correct folder. This is also possible without an administrator interface: a simple text editor is sufficient to create a post.


A text editor such as Sublime Text should not be confused with a word processing system such as Word. A text editor usually saves the entered text in plain text format and is usually used for creating and editing source code.

What are the advantages and disadvantages?

Depending on how website operators want to use their flat file CMS, these systems can either be the perfect solution or make things too simple when more complexity is needed. The advantages that the file-based content management system brings are largely due to its simple structure:

  • Speed: For smaller website projects, a relational DBMS overshoots the mark and is not really needed. By simplifying the structure in a flat file system, you can achieve higher speeds.
  • Simplicity: Large databases usually have a very complex structure, which is held together by lots of links. As a beginner, you can easily make a mistake, causing the database to collapse like a house of cards. Since flat file CMSs are based on a simple folder structure, you make less mistakes. Therefore, these systems are very well suited for people who have little knowledge of databases and don’t need a large database for their website project.
  • Security: The simpler the system is, the fewer errors can occur. Most mishaps happen when you lose track of the structure, meaning that an error can creep into the architecture, which can only be found and removed with great difficulty. Maintaining a simple folder structure with hardly any dependencies is much easier to handle. The also applies to external security: SQL is a popular target for malicious attacks. With SQL injections, attackers attempt to introduce their own commands into the database to spy on data and manipulate it. With flat file CMSs, you don’t have this problem.
  • Back-up: Backing up a flat file CMS couldn’t be easier: just use copy and paste. For more complex systems, routine back-ups are required to store the system data, database, and all integrated files. With a flat file solution, on the other hand, you just need to copy everything and save it somewhere else i.e. on a USB stick.
  • Moving: With WordPress, Typo3, or Drupal, moving from one server to another can take a lot of work. The same applies to relocating a website as it does to backing up a flat file CMS. Copy and paste is all that’s needed to move your website onto another server.
  • Work flow: If you’re using a classic CMS, editing the content is bound to the backend. However, if you want to make changes in a flat file CMS or add new content, you can use your favorite editor.

Of course, flat file CMSs are not the be-all and end-all. What can be a benefit to one project, can have a negative effect on the other:

  • Speed: If the data volume exceeds a manageable amount, more complex search queries will take longer. In cases like these, BDMS are the right choice: each access attempt is guided to the right destination by the links. On the other hand, with flat file CMSs, all data records have to be trawled through one after the other.
  • Server extension: Due to the folder structure, it is imperative that all files run on a web server. It’s not possible to distribute the data over several servers in the case of a too-high data volume or because of deliberate redundancies. 
  • User friendliness: One of the reasons that WordPress is popular is because you don’t need to write a single line of code to put a properly-designed website online. Flat file CMSs are still at the beginning of their development phase and not much effort has been put into making them more user friendly. Instead, it is still primarily a matter of improving stability, performance, and functionality. Therefore, working with flat file CMS usually requires more manual effort. If you can handle HTML, PHP, CSS, and Markdown, you will have no problems with a flat file system. However, inexperienced WordPress users may soon find it a bit tricky.
  • Support: The communities for individual flat systems aren’t as large as those for traditional CMSs. This has an impact on support and shared knowledge. If there is already a large user base, a documented solution and contact person can be found for each application area.
  • Themes and plugins: The small user group ensures that development and expansion are gradually moving forward, and also in a specific area. Traditional CMSs offer a much larger selection of themes and plugins that can be used to extend the basic framework.
  • Areas of application: A flat file CMS is difficult to adapt to special needs – if at all. WordPress can be customized with numerous plugins for different application areas (you can set up your WordPress page as a web store or as a community). Flat file systems are not intended for this purpose.

What kind of flat file CMSs are there?

  • Kirby: To install the CMS, users only need to download the starter kit files to their own web server (you also need to download PHP onto the server, just like with the other previously introduced projects). Kirby reads the structure of the website from the names of the folders. Texts can be created by Markdown. If this is still too much work, the Kirby panel can be used, which is an admin interface similar to a proper CMS. To use this CMS, the programmer (Kirby is a one-person operation) currently charges a fee per website. Kirby has a small number of plugins and themes and the flat file CMS can be connected to a MySQL database later on if a more complex structure is needed.
  • Statamic: Statamic’s offer is a little more expensive. It is based on YAML files, Markdown files, HTML files, and PHP files. This manufacturer also offers a panel for easier operability. In addition, Statamic recommends using Redactor, a WYSIWYG HTML editor.
  • Grav: This product is one of the most widely used flat file CMSs. The free open source project is driven by RocketTheme, a provider of CMS themes. Therefore, it is not surprising that Grav places more emphasis on graphic design than its competitors do. For example, images can be inserted and adjusted very well. Even the system’s own photo filters belong to Grav. By implementing doctrine cache, the CMS delivers very good performance. 
  • HTMLy: HTMLy is also an open source software, but it’s main focus is on blogging. The slim lined CMS also offers similar features: widgets, multi-author administration, and the ability to integrate comment functions. The admin panel and web installer make the setup and administration relatively easy.
  • razorCMS: Rather than working with an admin panel, the British razorCMS works with a solution directly on the website. This means that users can make changes directly on the web pages. You can log in via a control bar at the top of the page where you have numerous options: bloggers can create new posts and make changes here. This system is also offered as open source software via GitHub.
Flat file CMS Admin panel Themes Plugins Commercial  
Kirby some few  
Statamic few some  
Grav some many x  
HTMLy few x x  
razorCMS In-page editing few few  

Content management systems based on the flat file principle are somewhere between a normal CMS and a static site. Before flat file CMSs appeared on the market, you had to ask yourself this question when deciding on the right system: do I change the content regularly or is my website static? The new systems lie between the two options and are ideal for smaller projects. They are designed as a slim solution for content management. When it comes to user-friendliness, they are aimed more at users who have some experience with code. In most cases, knowledge of HTML, PHP, or CSS is required. No database knowledge is needed however! Website operators can focus on their website’s design and benefit from the slim-lined system.

For users who only require a static corporate website or a single-page landing page, a static site generator is probably the right choice. Many application areas can easily be created using generators such as the 1&1 website builder. However, if you want to work with dynamic content, but only on a small scale, flat file systems offer a good alternative to the usual CMS heavyweights.