Statamic CMS vs. Kirby CMS (WIP)

I'm evaluating content management systems right now and it looks like I boiled it down to Kirby CMS and Statamic CMS

Both systems are commercial and both systems are flat-file based systems with optional database storage.

This is going to be a work in progress of my findings. Not sure if this all will make sense, but I'll try.

Currently I'm documenting one or another gotacha in my wiki.

Price

You are free to try out both systems without limitation on a test environment or localhost. Statamic checks if you use a tld or subdomain like local.domain.dev (or any combination of that).

With one license you can run one instance of each system under several domains, but not as multi-site1 (at least for Kirby)

Kirby CMS Statamic CMS
99 EUR (~120 USD) 259 USD (~225 EUR)

Installation

Both systems are being pulled in via composer. Easy peasy.

Kirby is it's own thing, Statamic is based on Laravel and that's accounting for the initial weight.

Kirby CMS Statamic CMS
Size ~ 15 MB2 ~ 100 MB
Files ~ 1150 ~ 11000

While a vanilla install of Statamic was relatively smooth, incl. creation of a user, installing it into an existing Laravel app (Backpack), brought some problems. I had problems with reusing the Backpack user table and get additional fields installed and Statamic was missing some files for the initial app or so. At the end I was able to smooth that out, but it took a while.

For my usage, Backpack and Statamic are supposed to run together and complement each other, that's why I gave Statamic a try and I think it's a good combo.

However, getting results in the front and backend of statamic was a bit of a drag and it took a while to produce some pages.

On the other side, Kirby on-boarding was flawless. Great docs and examples.

Both systems share a similar terminology like collections for datasets (or pages), global variables, and blueprints for setting up forms in YAML, to model the content.

Statamic comes with a visual form builder and a ton of fields, while Kirby also offers a lot of form fields, but I had to fiddle around with YAML, which is easy but also a bit annoying to keep track of keys and the right indentation.

I'd say Statamic is much more mature and user friendly in terms of setting up blueprints.

Bot systems allow you to reference fields across yaml configurations, which is nice.

Performance

As I mentioned, Statamic is based on Laravel and with that comes a tremendous amount of weight. Composer runs out of memory every time I have to install another lib. (Need to delete the *.lock file!). Using xdebug to see the programm flow is slow as hell. And the memoy consumption is quite high. That was a bummer.

Kirby is really fast and ensures me more, that it can last under some pressure. Statamic, I'm doubting. It's maybe Wordpress-like in it's hunger for resources.

I'm biased but I can only tell you about our decision not to build Kirby on top of Laravel and keep it framework agnostic. Our entire source code weighs about 4,5 MB including all the assets and stuff for the panel and the entire PHP code. We truly believe that a faster and smaller system will in the end benefit our users, your visitors and finally also the environment: better performance, less energy consumption, bandwidth etc. We are trying to keep Kirby as compatible as possible with other frameworks, other template engines and other components that you need to add to your site. We also think that we are less bound to Laravel's future decisions this way. -- Bastian Allgeier (via Discord chat)

Statamic

Kirby

It looks like there is a relatively straight forward way to utilize one or another Laravel package.3

Templates

Kirby uses native php templating language (the original use case for php), but can be extended to any other templating language like twig.

Statamic invented its own template language called Antler and I don't know why they went this way - probably because it wasn't based on Laravel in the beginning. Laravel Blade templates are possible as well.

I have to say that I like the way how to write, or better organize Blade templates (or in this case Antler templates or Twig) more than the native Kirby way. Why is that?

In Laravel/Statamic (also Twig) you can use template inheritance so instead you write

<?php snippet('header') ?>
<main>
  <?= $page->text()->blocks() ?>
</main>
<?php snippet('footer') ?>

you setup a master layout

<!-- Stored in site/templates/layouts/master.blade.php -->

<html>
    <head>
        <title>@yield('title') | {{ $site->title() }}</title>
    </head>
    <body>
        <h1>@yield('title')</h1>

        <div class="sidebar">
            @section('sidebar')
            <h2>Description:</h2>
            @show
        </div>

        <div class="container">
            @yield('content')
        </div>
    </body>
</html>

and extend it in your page template.

<!-- Stored in site/templates/default.blade.php -->

@extends('layouts.master')

@section('title', $page->title())

@section('sidebar')
@parent

{{ $page->description()->kirbytext() }}
@endsection

@section('content')
{{ $page->text()->kirbytext() }}
@endsection

But I just saw, there is Blade for Kirby, so that's good to know!

Extending the CMS Backend

In both systems you can extend the backend with custom fields and dashboard content by utilizing php and vuejs components (which sucks a bit, because it requires a build step for the javascript).

DB Stuff

Resources

TBC


  1. https://forum.getkirby.com/t/definition-of-installation-webpage-for-license-purposes/13593/4 

  2. According to the founder it's ~ 4.5 MB I might have counted some additional packages. 

  3. Installing support for Laravel Query Builder and Eloquent, Translatable and Blade Templates reflects in more resource usage immediately.