Est. 1983 Price · Free
Steven Grant

Digital Evangelist

Notebook

Comparing Craft CMS to Statamic

There's been a few posts comparing CMS platforms but I haven't seen one that compares what I believe to be 2 very comparable platforms.

There's been a few posts comparing CMS platforms but I haven't seen one that compares what I believe to be 2 very comparable platforms.

For me, I believe that Statamic and Craft are a new breed of modern CMS platforms. For the last 2 years, I've built the majority of new projects on Craft CMS and I've used Statamic 1.x on smaller builds - however, Statamic 2.x has made it comparable with Craft in pretty much all areas.

The immediate thing to know about Statamic is that it's a flat-file CMS (no database and NOT a static site generator like Jekyll).

Both platforms are incredibly simple to run locally, although Craft does need a database for that. Statamic allows you just to run a server over your webroot and you're good to go.

Statamic gives you a default 'Redwood' theme. It's not really meant to be used for an actual site (although this blog uses the guts of it because I'm lazy) but just a tag reference.

You can of course run the Statamic installer which checks your PHP version is valid and makes any recommendations. It then checks the permissions, license and then asks you to configure a user.

Craft pretty much does the same thing but doesn't give you much in the way of default templates; which I'm totally cool with.

Control Panels

This is the Craft control panel

and this is the Statamic control panel

I've seen barbs aimed at both comparing them to WordPress as well as Ghost, but there's only so many ways you can lay these things out that make sense for the end user.

Personally, I prefer the Craft CP over Statamic. It just feels a little more polished. However I do love the 'search for anything' feature in Statamic.

That said, with Statamic, I rarely spend any time using the control panel for my site configuration.

Herein lies the beauty of a flat-file system, everything (yes everything) can be set using files. Content is stored as Markdown and configuration is set using YAML.

We've found this to be great when you're working in a team. No more shared database servers when you need to add new fields or even content. You simply add your config to the files, commit to Git and your teammates can pull from the repo and dance.

Content types

Us developers tend to focus on things that make our lives easier and not necessarily the client. This is silly because the client is the person (usually) responsible for managing the site content post launch.

Statamic splits the control panel content into 6 definitions

  1. Pages - a page in a tree
  2. Collections - groups of content; for example, blog posts, galleries - things that could potentially become bloated in a tree structure
  3. Assets - files, whether images, videos, documents, zip files, or anything else within reason you want to upload, manage, and display on your site
  4. Taxonomies - a system of classifying data around a set of unique characteristics such as category, color, or the way smart scientists have grouped all living creatures into Kingdoms, Species and so on.
  5. Globals - perfect for reusable content like: company info, footer and sidebar content, site settings (think features connected to on/off switches)
  6. Users - they are defined as content

Craft splits content into 7 definitions (see Craft docs for definitions)

  1. Single - single pages (not something I generally use)
  2. Structure - a page in a tree
  3. Channel - groups of content; for example blog posts, galleries - things that could potentially become bloated in a tree structure
  4. Assets - files, whether images, videos, documents, zip files, or anything else within reason you want to upload, manage, and display on your site
  5. Globals - perfect for reusable content like: company info, footer and sidebar content, site settings (think features connected to on/off switches)
  6. Users - they are defined as content
  7. Categories - create taxonomies for your entries, users, and assets using Categories.

As you'd expect, the functionality is essentially the same but naming differences exist.

Fields

Entry content in both systems are defined by field groups tied to the content type.

With Craft you configure fields directly in the control panel and assign fields to sections.

Statamic gives you the ability to configure fields in the control panel (that will auto-generate the YAML) or directly by writing your own YAML files in your favourite text editor. There are some fields that are harder to configure (for example a Grid field) so I'll generally use the CP for that.

As all of the config is stored in files, I can easily copy settings between projects. I have a little suite of common content types stored as Gists that makes it really easy to replicate across projects.

Craft has some third-party plugins than export fields to JSON but Statamic just feels cleaner and doesn't have the plugin overhead.

In both cases, fields can be reused across content types. With Craft you would use the field layout and with Statamic, you would call a fieldset as partial within another. For example

Entries

The publishing interface that your client will work with on both platforms are quite similar.

Here's the view of publishing a 'blog post' within Statamic

and here's something similar within Craft

Like I mentioned before, personally, I prefer the Craft control panel for publishing but there's elements of Statamic that I like too. With Craft, I can define multiple tab groups that hold different fields. The example above shows 1 'Content' tab but I often have one for 'SEO' content. I find instances like that are less overwhelming for the end user than having everything on one page.

With Statamic however, I can configure the width of fields which is handy when you have short-length fields (for example a toggle switch).

I also like that Craft groups the meta data (slug, date etc) on the right and leaves the central area for content only.

Both systems offer a 'live preview' or 'sneak peek' function which is brilliant for clients. This means that they can edit their content and see in real-time how it'll look when they save. One win for Craft is that it allows you to create versions of an entry as well as leave comments as to what has changed. Useful if you're working within an editorial team.

Both platforms allow you to 'CMD + S' at the entry level to save changes to your entry, rather than having to hunt for the pesky 'save' button.

Grid & Matrix

The Grid (Statamic) and Matrix (Craft) field types in each system give your editors tremendous power to curate content.

Here's the Matrix field in action.

Statamic's Grid is the same and even offers the ability for Inception like 'Grid within a Grid' - something that many people have called for within Craft's Matrix field. You can define multiple 'blocks' within a Grid or Matrix. For example, I often have a 'Page builder' field that contains: content block, audio block, quote block, video block, code block, heading block.

These blocks mean I can keep my markup out of the content and define it purely at the template level.

These respective field types also allow you reorder the blocks into whatever makes sense for the content.

Multi-lingual

Both systems come with multi-language capabilities right out of the box. Your general locale is set during install and you can add other locales further down the line.

Templating

Both platforms have very different templating tools. Craft uses Twig whereas Statamic use its own 'Antlers' format as well as supporting Laravel's blade.

I'm more partial to Twig because it's more cross platform. Drupal uses it and I also use it for writing static markup for general front-end development.

Commerce

Craft is the clear winner here at the moment with first-party Craft Commerce plugin. Statamic 1.x had Bison but this is someway off being ready for 2.x

Craft also has the very handy Charge plugin that can handle smaller commerce requirements like subscriptions, donations, digital downloads to name but a few.

That's not to say that you couldn't use a commerce Laravel package like this one and hook it up to your Statamic site but I feel like it's better to have everything in the one place and more importantly from the same vendor. That way there's less likelihood for breaking changes in your system.

Framework

Both platforms are powered by 2 very popular PHP frameworks. Craft sits on top of Yii and Statamic sits on top of Laravel. The Wilderborn team behind Statamic are also quite active within the Laravel community.

Laravel is quite a fast-moving framework whereas Yii is more of a steady release cycle.

Plugins

Craft seems to have a more mature plugin ecosystem at this point but given the number of Laravel devs out there, I can see this growing in the near future.