Technical

Five of the best flat-file CMS solutions

While Drupal, Wordpress and Joomla are the undisputed champions of the content management system (CMS) universe, simpler, flat-file CMSs like Grav and Pico also have their place for simpler websites. Front-end developer Joëlle had a look at the advantages of this approach and some of the leading options on the market


Five of the best flat-file CMS solutions

Drupal, Wordpress and Joomla are all popular choices for building small to large websites, so regular users might instinctively call on these familiar tools when a new web project lands.

However, these options could be overkill for some smaller, simpler projects. They have numerous extension features that are targeted towards larger, more complex websites, which can have an adverse effect on performance and make the site harder to maintain.

This is where a lighter weight, flat-file CMS can come into play.

A flat-file CMS can perform faster and be easier to maintain

A flat-file CMS does not require a database; all the content is instead stored in files and organised into folders (usually in XML or markdown format, and then parsed). This means that data can be displayed to the user faster, as there is no need for a connection to a database and subsequent queries.

The source files themselves are also a lot leaner. With fewer features and plugins built in, the complexity of the website is reduced. This, in turn, can lessen the chance of things breaking throughout the lifetime of the website, as with more moving parts, more things can go wrong. The small size can also mean that serving is cheaper because the site takes up less space – although not all flat-file CMSs are free.

In more complex sites, an entire database can become corrupted or wiped if an erroneous query is made. But if something goes wrong while editing a flat-based file, only that file will be affected. Another benefit of a flat-file approach.

It is often claimed that flat-file CMSs are more secure as they have no database that can be hacked into, but this benefit is negligible because a lot of the security will be at the server level rather than application level, and anything with credentials can be hacked. However, a definite advantage of a flat-file CMS is the ease of maintenance and backup. This is because all of your content and files are in one place, and can be under version control. Once more, because they are small in size and don’t need to connect to a database, they are certainly very portable.

Use a flat-file CMS for simple websites

Flat-file CMSs tend to work best for simple sites: the kind that could be built as static pages, or where your end-users only need the basics of content management. Ideally, your product roadmap wouldn’t include any further functionality down the line, such as e-commerce, complex user management, or anything else that requires an advanced admin interface.

In fact, some flat-file CMSs have no admin user interface at all, so end-users edit the site with a text editor. This could be difficult for some content editors, as with no interface or validation, mistakes can be made more easily. There’s the risk of editing the wrong file and therefore breaking the website. CMSs with no UI will usually expect the content in a strict format like XML, which would need to be learned.

For these reasons, it’s important to understand your client’s requirements and technical ability very well before making the choice to use a flat-file CMS.

 

Top 5 flat-file CMS for simple websites

 

Five of our favourite flat-file CMSs

If you’re considering a flat-file content management system, here is IE Digital’s quick overview of some of the leading choices:

 

  1. Grav
    This flexible CMS is open source, and uses YAML, Markdown, Twig and Symfony.  Many plugins, themes and even skeleton packages are available to get up and running more quickly.

  2. Statamic
    Built on Laravel, this more expensive option has a lovely swish interface and uses YAML for templates and config as well as content. Statamic also comes with a WYSIWYG editor.

  3. Pico
    Pico is an open-source, extra lightweight CMS with no user interface. It uses Twig for templating, and content is created in Markdown format.

  4. Pulse
    Quick to set up and easy to back up, Pulse CMS is good for those with little technical experience and includes a WYSIWYG editor.

  5. Kirby
    This well-established CMS uses folders to organise its content and has many plugin options. It too, uses Markdown syntax and has a large, helpful developer community.


Here at IE Digital, we usually deliver large-scale projects in Drupal. However, we might be inclined to use a flat-file CMS for holding pages, or any sites with a well understood and short shelf-life.

However simple the site is, it is liberating for clients to make quick updates to their websites that usually would have to come through the developers, due to budgets or time constraints that don’t allow for a full CMS. Flat-file CMSs can usually solve this problem due to their comparatively quick setup time and small maintenance overhead.

They’ll never completely replace database-driven CMSs, but the flat-file CMS is certainly gaining popularity, and it’s great to have so many strong choices.

Flat-file CMSs tend to work best for simple sites. It’s important to understand your client’s requirements and technical ability very well before making the choice to use a flat-file CMS.

Joëlle Symons
Front-End Developer, IE Digital