The recent unrest in the WordPress community has got us exploring other ways of building websites. We’ve been building sites with WordPress since the late 2000’s, so this is a big deal. We did try building a few sites with Jekyll, looking for an easy way to build static websites, but while Jekyll had some real benefits, it never seemed like something we could ship for clients.
A few months ago someone suggested we look at Statamic. We had not heard of Statamic nor Laravel, upon which it is built. (Yes, we’ve been living under a WordPress rock.) Laravel is a PHP framework that is much more general than WordPress, a way to build almost any web app. Laravel is highly regarded, growing, and considered quite securly architected. Statamic is a content management system built as a Laravel app.
At a glance, the Statamic control panel looks an awful lot like the WordPress dashboard. Upon deeper inspection it turns out to be both less chaotic and more capable out of the box. Statamic includes the equivalent of WordPress custom post types, custom fields, and forms while maintaining a clear and approachable interface. Where WordPress has the feel of a system cobbled together over the years with little sense of where it would end up and not much attention to internal consistency, Statamic feels like it knew what it wanted to be before it was created. Deep down, Statamic is nothing like WordPress even though any casual WordPress user would feel totally comfortable using it.
For the developer, Statamic is a joy. There is a massive learning curve, to be sure. Although both WordPress and Statamic run on PHP, the two could not be more different. Getting to know Statamic means learning Laravel, and that’s a whole new universe for some of us. But actually, we have seen way less PHP while building a Statamic site than we typically see building a WordPress site. Templates are built using an engine called Antlers that lives right in your HTML files in a way that feels much more harmonious than PHP. In fact, if you go with the flow and also adopt TailwindCSS for your templates, then you will also hardly see any CSS at all. We have built two sites already in Statamic and hardly had to touch any PHP beyond a few config files. It is remarkable, a throwback to the days when we could just write pages in HTML.
Custom post types, custom fields, and forms all feel like awkward bolt-ons in WordPress, but in Statamic they share one common workflow of blueprints that display fields or fieldsets. A custom post type is just a collection of entries that shares a particular blueprint. A form is also just a blueprint bringing together and arrangement of fields. Custom fields are simply fields, which can be used in any blueprint. So you build specialized collections and forms (and even global variables for the site) with the same set of tools. In fact, there is nothing special or privilaged about the default collections, they use exactly the same blueprints and fields. With Statamic there is no friction if you need a particular piece of data in a collection, just add the field to the blueprint.
By default, Statamic requires no database. All data is stored in plain files. The beauty of this is that everything from the content of your pages to the blueprints and fields to the templates and configuration is just files in the filesystem ready to be managed in a source control system like Git. If you really want a database, the tools for keeping elements in a database are available, but for most sites they are not necessary. Statamic benefits from the terrific caching Laravel provides to keep sites speedy without the database. Statamic even provides a static site generator that can spin the whole site out as static files that do not even require PHP to be presented.
Although you would not know it, because the design is nearly identical to what we had in place last week, this week we rolled out a new version of our website being generated by Statamic. The site has been rebuilt using TailwindCSS classes as well. Our experience recreating this site has taught us a lot about Statamic, Laravel, and Tailwind, and we have a lot more to learn. But the biggest lesson is that building sites this way feels really good. We feel silmultaneously “closer to the metal,” able to focus on HTML, and free of constraints, easily adding the elements we need to the user experience to make the site easy to edit and manage.
If you are not a developer, then you may have to stick with WordPress, as we note, there is a learning curve to picking up Statamic and it does require that you be comfortable with code and the command line. If you are a developer interested in an alternative to WordPress, Statamic is worth your time. If you are a developer new to building a website, there few places better to start than Statamic.