A rel­a­tive­ly new variant of content man­age­ment systems is now competing with tra­di­tion­al 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 ad­van­tages and dis­ad­van­tages compared to their major com­peti­tors. 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 for­mat­ting. 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 re­la­tion­al databases, where the data sets have links, indexes, hi­er­ar­chies, and pre­de­fined formats. Flat file databases don’t have any of these – they are the digital equiv­a­lent 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): in­for­ma­tion within a data set is separated from each other with commas, the data set itself is ter­mi­nat­ed 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 com­plex­i­ty. Flat file CMSs also make use of this principle and therefore offer an in­ter­est­ing coun­ter­bal­ance to the heavy­weight tra­di­tion­al content man­age­ment systems.

How do flat file CMSs work?

All major, well-known content man­age­ment systems use MySQL or similar database man­age­ment systems in the back­ground. The database man­age­ment 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 com­plete­ly forgoes database man­age­ment, 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, mul­ti­me­dia, and text files) only onto the server. Af­ter­wards, the website is prac­ti­cal­ly ready for use. The queries go directly to the files and are not dis­trib­uted over MySQL. For example, de­vel­op­ers store access data for each user in a separate YAML file. By naming the file, it enables the CMS to find the cor­re­spond­ing 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 ad­min­is­tra­tor interface: a simple text editor is suf­fi­cient to create a post.

Note

A text editor such as Sublime Text should not be confused with a word pro­cess­ing 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 ad­van­tages and dis­ad­van­tages?

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 com­plex­i­ty is needed. The ad­van­tages that the file-based content man­age­ment system brings are largely due to its simple structure:

  • Speed: For smaller website projects, a re­la­tion­al DBMS over­shoots the mark and is not really needed. By sim­pli­fy­ing the structure in a flat file system, you can achieve higher speeds.
  • Sim­plic­i­ty: 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 ar­chi­tec­ture, which can only be found and removed with great dif­fi­cul­ty. Main­tain­ing a simple folder structure with hardly any de­pen­den­cies is much easier to handle. The also applies to external security: SQL is a popular target for malicious attacks. With SQL in­jec­tions, attackers attempt to introduce their own commands into the database to spy on data and ma­nip­u­late 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 in­te­grat­ed files. With a flat file solution, on the other hand, you just need to copy every­thing 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 re­lo­cat­ing 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 man­age­able 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 des­ti­na­tion 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 im­per­a­tive that all files run on a web server. It’s not possible to dis­trib­ute the data over several servers in the case of a too-high data volume or because of de­lib­er­ate re­dun­dan­cies. 
  • User friend­li­ness: 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 de­vel­op­ment phase and not much effort has been put into making them more user friendly. Instead, it is still primarily a matter of improving stability, per­for­mance, and func­tion­al­i­ty. 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, in­ex­pe­ri­enced WordPress users may soon find it a bit tricky.
  • Support: The com­mu­ni­ties for in­di­vid­ual flat systems aren’t as large as those for tra­di­tion­al CMSs. This has an impact on support and shared knowledge. If there is already a large user base, a doc­u­ment­ed solution and contact person can be found for each ap­pli­ca­tion area.
  • Themes and plugins: The small user group ensures that de­vel­op­ment and expansion are gradually moving forward, and also in a specific area. Tra­di­tion­al CMSs offer a much larger selection of themes and plugins that can be used to extend the basic framework.
  • Areas of ap­pli­ca­tion: A flat file CMS is difficult to adapt to special needs – if at all. WordPress can be cus­tomized with numerous plugins for different ap­pli­ca­tion 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 pre­vi­ous­ly in­tro­duced 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 pro­gram­mer (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 man­u­fac­tur­er also offers a panel for easier op­er­abil­i­ty. In addition, Statamic rec­om­mends 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 Rock­et­Theme, a provider of CMS themes. Therefore, it is not sur­pris­ing that Grav places more emphasis on graphic design than its com­peti­tors do. For example, images can be inserted and adjusted very well. Even the system’s own photo filters belong to Grav. By im­ple­ment­ing doctrine cache, the CMS delivers very good per­for­mance. 
  • 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 ad­min­is­tra­tion, and the ability to integrate comment functions. The admin panel and web installer make the setup and ad­min­is­tra­tion rel­a­tive­ly 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 Com­mer­cial
Kirby some few
Statamic few some
Grav some many x
HTMLy few x x
razorCMS In-page editing few few
Summary

Content man­age­ment 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 man­age­ment. When it comes to user-friend­li­ness, they are aimed more at users who have some ex­pe­ri­ence 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 ap­pli­ca­tion areas can easily be created using gen­er­a­tors such as the IONOS website builder. However, if you want to work with dynamic content, but only on a small scale, flat file systems offer a good al­ter­na­tive to the usual CMS heavy­weights.

Go to Main Menu