Craft CMS | Self-Hosted WordPress Alternatives Part 1

I’ve been developing with WordPress for quite some time now (almost 7 years), which is practically an eternity in the world of technology and software development. Realizing I’ve spent all this time with just WordPress has got me wondering what some of the other CMS platforms look like today.

Some of the frameworks that were available when I first started working with WordPress have matured a lot, and there are some new players on the field that are definitely worth a look. In this series, I’ll be taking a look at some of these platforms and comparing them in several aspects to WordPress.

Since I’m looking at this from a development perspective, I’ll be focusing on the self-hosted options, which means that I’ll be leaving out some of the more popular rivals to WordPress like Wix, SquareSpace, and Medium.

To kick this off, I’ll be taking a look at Craft CMS by Pixel & Tonic, a software development team that was behind some of the best add-ons for ExpressionEngine. They have since moved on from ExpressionEngine to create their own CMS that is built on the popular Yii framework.

Craft bills itself as “a content-first CMS that aims to make life enjoyable for developers and content managers alike”. This is a change in stride from WordPress which appeals to a much wider variety of people, so it should be interesting to see how that change affects Craft CMS as a whole.

Installation

If you’ve ever used the WordPress Famous 5-Minute Install, you’ll find the installation process for Craft CMS to be very similar. To get it set up, you need to download the .zip file from craftcms.com and upload the files to your web server.

Once you’ve done that, the craft/config/db.php file needs to be edited to include your database information, much like the database information in the wp-config.php file in WordPress. You may also need to edit the /index.php file to update the path of the /craft/ directory (you can find more details on this in the documentation).

You’ll then be able to visit example.com/admin to run the installer, which sets up your admin account and finishes the installation.

Winner: Tie. The installation took me about the same amount of time as it does to install WordPress. This is important to me as a developer since any time spent setting up a CMS instead of writing code is time wasted.

Usage

Upon opening the dashboard after installation, you’re met with a very simplistic admin section. There are only three menu items initially, but more are added as you start enabling functionality.

One of the first things I noticed about Craft was that it included some critical functionality that is left up to plugins in the WordPress world. Database backups, the ability to run a find & replace, and email support (via SMTP, POP, or Gmail) are all available in the Craft settings page.

Craft settings

While I like the fact that WordPress is extensible enough for plugin developers to add this type of functionality, I also like having an officially supported solution, as is the case with Craft. Less plugins to install and update is definitely a good thing.

Another area that Craft shines is the flexible approach to routing. While you can achieve something similar with WordPress templates and rewrite rules, Craft offers a straightforward routing system that lets you easily set up URLs that correspond to your HTML templates (more on that below).

I also like Craft’s approach to organizing uploads. Instead of putting all media into year and month directories like WordPress, you can easily define several types of assets that each have their own source directory. This means you can have a folder for images and another for PDF files, or any kind of organization you can think of.

Craft CMS assets

Winner: Craft. I like the way that Craft keeps the admin dashboard as simplistic as possible, while also managing to include some core functionality that is missing or left to plugins in WordPress.

Core Architecture

One of the biggest pain points for WordPress is the large amount of legacy code that has accumulated over the years. The codebase is a mix of functional and object-oriented programming, and sometimes it can be hard to see a method behind the madness.

Craft takes a much more controlled approach by using the Yii Framework and enforcing a MVC (model, view, controller) codebase. This helps to make the core codebase much more organized compared to WordPress, which often has features spread out across multiple files and directories and isn’t always as intuitive.

Winner: Craft. I’ve been working with WordPress for years, but after a few minutes reviewing the Craft core, I already feel more familiar with Craft. With WordPress, if I need to see how something is done in core, I often need to check the documentation, but finding something in Craft is as easy as opening up the craft/app directory.

Templates

Unlike WordPress, there is no integrated theme repository available from the admin dashboard. In fact, there aren’t any pre-made themes at all! Instead, the focus is on building your own templates using plain HTML files and the Twig templating system.

Here’s an example of the template that comes with the Craft download:

<body>
    <div id="container">
        <header id="header">
            <h1><a href="{{ siteUrl }}">{{ siteName }}</a></h1>

            <nav>
                <ul>
                    <li><a href="{{ url('news') }}" {% if craft.request.firstSegment == 'news' %}class="active"{% endif %}>News</a></li>
                </ul>
            </nav>
        </header>

        <main id="content" role="main">
            {% block content %}
                <p>If you see me, you haven’t set your <code>{% verbatim %}{% block content %}…{% endblock %}{% endverbatim %}</code> yet.</p>
                <p>See Twig’s <a href="http://twig.sensiolabs.org/doc/templates.html#template-inheritance">Template Inheritance</a> documentation for an explanation.</p>
            {% endblock %}
        </main>

        <footer id="footer">
            Copyright {{ now.year }} {{ craft.request.serverName | ucfirst }}. All rights reserved  •  Built with <a href="http://craftcms.com">Craft</a>
        </footer>
    </div>
</body>

This looks pretty different from the average WordPress template file! Instead of PHP and The Loop, we have Twig template tags, including some global variables passed to us from Craft.

Winner: Tie. While Craft including an officially supported templating system is a big step forward, I prefer the flexibility and large number of themes that WordPress offers. Those who use Timber or similar templating systems already will undoubtedly find Craft to be the better option here.

Plugins

If you’re working on a site with a lot of custom functionality, you’ll likely need to install some plugins. While there isn’t yet an official, centralized plugin repository, the team behind Craft is working on an official plugin store that will be released with the upcoming Craft 3. In the meantime, there are a few third party sites like straightupcraft.com that list both free and paid plugins that can be used.

Creating plugins is relatively similar to creating WordPress plugins, although it takes a more object-oriented approach. The main plugin file must be a class that is responsible for letting Craft know about the plugin, similar to the file header in the main PHP file of a WordPress plugin. From there, how you build out the rest of the plugin will depend on the functionality that you need to add, but according to the docs it will generally revolve around building models and controllers in an MVC-style approach. This is in contrast to WordPress where, aside from the main plugin file, you have a bit more freedom in how you develop the plugin.

Winner: WordPress. The sheer number of WordPress plugins, the integrated plugin directory, and flexibility when it comes to development is enough to win me over from Craft’s clean, structured approach. However, this could easily change over time as the Craft plugin ecosystem matures.

Custom Fields

Have you ever tried to use custom fields for a post type in WordPress? You either tried to use the basic core system that looks like this:

Or you gave up and installed the great Advanced Custom Fields plugin, which gives you a lot more flexibility and dozens of different field types.

Craft takes a similar approach to ACF by making the core custom fields UI flexible and intuitive. Aside from having a lot of field types to choose from, there’s also a field layout editor that lets you organize your fields and assign them to multiple sections (or post types as we know them in WordPress).

Winner: Craft, by a long shot. It matches the functionality of one of the best paid plugins for WordPress, and includes it for no extra charge in the Craft core.

SEO

Both WordPress and Craft will allow you to have clean, SEO-friendly URLs, but leave the rest up to you.

For SEO metadata and social media support, WordPress users will likely install the popular Yoast SEO plugin, while Craft users can choose from a few different SEO plugins like SEOmatic or Sprout SEO. Craft users might also roll their own SEO solution using Craft’s custom fields UI and custom templates.

Winner: Tie. It’s easy enough with either CMS to setup everything you need to optimize your pages. WordPress will have the edge in the number of SEO plugins available, but it will be easier to create your own custom fields for SEO in Craft.

eCommerce

Both WordPress and Craft are primarily content management systems at heart, but offer plugins to convert your website into a full-blown eCommerce platform.

The most popular option for WordPress is WooCommerce, an eCommerce plugin that was purchased by Automattic back in 2015. WooCommerce itself is free, but there are several paid extensions to add additional functionality and payment gateways.

Craft Commerce is Craft’s official eCommerce solution, and it takes a different approach to pricing. Instead of limiting functionality in the core plugin and offering extensions, it includes a full feature set with over 20 payment gateways. At $700, this could either be a bargain or prohibitively expensive compared to WooCommerce, depending on the number of extensions you need.

Winner: WordPress/WooCommerce. While every eCommerce store is different, and some larger stores might find Craft to be the better deal, I think many would prefer the lower bar to entry for WooCommerce and the piecemeal approach you can take to upgrading your store.

Documentation

No review of a CMS would be complete without taking a look at the available documentation. While writing this article I had to consult the Craft documentation frequently, and I always found the answer. The official docs are easy to navigate and seem to cover everything in detail.

I think the documentation for WordPress is more than adequate as well, although there are definitely some areas that could be improved on. But I’d likely think the same thing about Craft if I had as much experience working with it as I do WordPress.

Winner: Tie. Both content management systems have sufficient documentation to hit the ground running.

Pricing and Licensing

Pricing is another area where Craft really differs from WordPress. While the self-hosted version of WordPress.org is free and contains all core features, Craft offers a free version that can be used by one developer. If you want to give a client access to the admin panel, you’ll need to spring for the $199 “Client” license. And if you have more than one developer and one client that needs access, you’ll need the $299 “Pro” license.

These licenses are one-time and per-site, so they could easily be factored into the initial cost of the website. The Client and Pro licenses also allow you to customize the branding of the admin area, which is a nice touch for agencies that might want to white-label the CMS and make it their own.

It’s also worth noting that Craft is not open source. Unlike the GPL license that WordPress uses, Craft uses a custom license that does not allow modification of core files or derivative works based on Craft.

Winner: WordPress. I can definitely understand why Pixel & Tonic might want to keep Craft CMS as proprietary software, but at the same time I do wish it was open source. I think WordPress being open source is one of the biggest reasons for its success and absolutely huge community, and is one of the reasons why I love it so much.

Conclusion

I can see why Craft CMS is gaining in popularity – it manages to capitalize on some of the shortcomings of WordPress and offer a modern, customizable CMS that is well-suited to developers and web agencies.

While I still prefer WordPress, it was definitely interesting to see a different approach and some of the things that Craft does better. A CMS with a modern, object-oriented code base is like a breath of fresh air, and I think it’s this type of approach that will help to push the next generation of content management systems into the mainstream.

Have you ever used Craft CMS on a project before? If so, what did you think? Are there any other content management systems that you’d like to see us cover in this series? Let us know in the comments.

In part 2 of this self-hosted WordPress alternatives series, I take a look at Grav, a flat-file CMS: https://deliciousbrains.com/grav-cms-self-hosted-wordpress-alternatives-part-2/

About the Author

Matt Shaw

Matt is a WordPress plugin developer located near Philadelphia, PA. He loves to create awesome new tools with PHP, Javascript, and whatever else he happens to get his hands on.

  • Definitely take a look at ProcessWire as well.
    http://processwire.com/

  • OMG! Blasphemy!

  • dsgreen

    I’ve used ExpressionEngine for years, and then also adopted WordPress due to the open source licensing and large community. Both ExpressionEngine and Craft are great from a development perspective, but the proprietary licensing will be a drawback for some.

  • I have used Craft, WordPress and ExpressionEngine. There’s no contest for me, Craft is far superior to the others.

  • Andy Leverenz

    Geat article Matt!

    I’m definitely interested in Craft, I just haven’t gotten to where I need it quite yet. I just started making use of Kirby. Super light-weight, extendable, and no database.

    • Chris Haff

      It’s stupid fast and great for content sites. I used it last year for a campaign landing site that was targeted by a TV campaign. We had thousands of concurrent users and response times never got to 100ms.

      Beyond relatively simple content it seemed somewhat limited when you want to introduce content relationships beyond children. You would not want to do an events site or more complex e-commerce site for example. Or perhaps Kirby has grown since. It seemed like quite an active community.

  • Phil

    This looks cool – but what is keeping us with WP for now is the built in Rest API – We are moving more and more to headless WP solutions with Angular/Mobile front ends… We are still on the lookout for a more modern option, but have yet to find a replacement CMS that is as stupid easy for publishers/clients and also robust enough to do whatever we want as developers like WP is….. can you test run some Node options?

  • chrismccoy

    statamic, and october cms are other good ones too

  • Luke Cavanagh

    Look at Grav.
    https://getgrav.org/

  • Dougal Crowder

    Found myself moving away from WordPress in the last year or so. Nearly finished my 1st Craft site and it has been a joy to use. I think Grav CMS is a good project too and worth a mention. Nice article.

  • gatchaman

    I am a big fan of Craft, and would use it for most projects. However, most clients request WordPress since they have at least one person on staff who is familiar with it.

    The cost of development is also higher on a Craft site – primarily because of the smaller plugin ecosystem. Don’t get me wrong – I prefer to code everything myself and not rely in plugins. But clients tend to balk at paying more.

  • What about consuming them via front-end JavaScript framework? WordPress has wp-api, what about Craft? I’m excited about prismic.io

  • Hey Matt, awesome post, and looking forward to more. I’ve been dabbling with Laravel and Node a bit, so Statmatic and something like KeystoneJS are pretty interesting.

  • travis foshe

    Just for fun I have been playing with Kirby (https://getkirby.com/). No where near a replacement for a robust CMS but very fun for small projects

  • S. P. W.

    WordPress, WordPress alternatives, and self-hosted WordPress alternatives are practically always missing what most people want when putting together a site.

    WordPress and many other alternatives are good choices as website building platforms that allows an average person to create a nice website free of charge. But…

    Many, if not most, people who want a website really want a web BUSINESS –they want to make money with their site. Yet while putting up a site is easy (as the “cheap-quick-easy” marketing hype promises), knowing how to build an online business is another story.

    Neither WordPress nor any of WordPress alternatives “as is” will build an online business which you get if you know how to do SEO and build traffic. They are all are missing a do-able start-to-finish BUSINESS process.

    The reality is that most sites never get more than a handful of visitors. And without traffic, income is hard to come by. In other words, No traffic = No profits.

    Surely, you can slog through the mountains of business building advice and tools that are out there. But for most WordPress users and those using these alternatives it all ends up being too much.

    So, despite the dazzling display of WordPress/WordPress alternatives features (even SEO gadgets), the reality for most (non-tech) people who want to create a web business with WordPress or its alternatives is that they need to adhere to an easy-to-follow, all-in-one, proven, ethical webbusiness-building system (not a get rich quick scheme), tailored to say the WordPress platform, to get (1) a significant amount of traffic and get (2) targeted traffic (example of such a system: WealthPrinciples dot net).

    Otherwise… you’ll end up having (and building) only a WordPress/Name of WordPress Alternative webSITE (or BLOG) but not a webBUSINESS.

  • Grant Palin

    I’ve tried Craft. In many ways it is a breath of fresh air being accustomed to WordPress. Nice to see so much functionality included that had to be added on in WP. It seems to me to take a little more work to get content types and customizations in place, but that may be due to my relative unfamiliarity.

    On the other hand, I’ve been digging Kirby CMS for a while, having implemented one project with it. I like it a lot because it is straightforward to get running, has a nice API and community, and just makes sense. Downside is that it takes more work to get customized initially, and while it supports plugins it is not a matter of searching and clicking “Install”.

  • TaoKeo

    Working in Craft is an absolute joy for both developers and clients. I LOVE it. I’ve been building custom WordPress sites for almost 10 years now and I still find it to be a bit of a pain at times. For instance:

    – My first step in any WordPress build is to spend an hour simply hiding all the mountains of crap it comes with that my client doesn’t actually need.

    – I’m forever looking up custom WordPress functions (do I use the_something, get_the_something or get_something?).

    – I still occasionally get tripped up by the Loop at times and find myself asking “what data does WordPress THINK I want”. I prefer telling vs. mind-reading.

    – Even simple things like adding a column in an admin list requires PHP. Although that’s much easier to do now for taxonomies with the “show_admin_column” parameter.

    – ACF is awesome but the way it’s forced to store data is sometimes slow and
    database intensive (i.e. serialized arrays in wp_options). I once had to write a ton of very custom SQL to prevent WordPress from making 10,000+ database calls on a site that used ACF for taxonomy custom fields. Thank god for the new termmeta table.

    – Ever try building reciprocal content relationships in WordPress without a plugin like Post-2-Post? For instance a conference website where you want reciprocal relationships between a “speakers” CPT and a “talks” CPT. Brutal and very hacky. In Craft this it literally a couple clicks and a single line of code in your query.

    – I also love the way you can easily add a field to anything in Craft. Even image assets can have fields. And everything is displayed and retrieved in a consistent way. As opposed to WordPress where yes, you can add fields to almost anything with ACF but when, where and how those fields are displayed and how the data is retrieved is very inconsistent.

    Bottom line… I would never use WordPress again if I could. But too many clients ask for it and it does have the huge advantage of a massive library of plugins. That said, with Craft you often don’t need plugins.

    Also I might disagree about the WooCommerce conclusion. Yes it’s “free” but I have yet to build a WooCommerce site that didn’t require a bunch of paid add-ons. It doesn’t take long for those add-ons to add up to $1000. And that’s an annual licence as opposed to a lifetime one. CraftCommerce could actually he cheaper in the long run in many cases.

  • ParkerDavis Markdept

    Everything you are talking about here can be summarized in Processwire https://processwire.com/ It’s open source, easy for publishers/clients, robust for developers, a headless cms, have tons of cms features already included in the core and lots of free modules to extend this core, allows to use Vue.js, Angular, etc. Easy to start, ideal for both content and application sites. I am not a programmer and I move with him like a fish in the water. Just take a look.

  • Matt Shaw

    We just published my second post in our self-hosted WordPress alternatives series. This time all about the flat-file CMS, Grav: https://deliciousbrains.com/grav-cms-self-hosted-wordpress-alternatives-part-2/

  • Matt Shaw

    Hi Mic, I just posted a review of Grav as part 2 – check it out:
    https://deliciousbrains.com/grav-cms-self-hosted-wordpress-alternatives-part-2/

  • Khürt L. Williams
  • Jens

    I really love craft and try to use it for most projects – the main reason for me is that I can build a much more intuitive UI for the content creators and I feel that I need less extra code to get everything done. Having redactor as core editor for rich text fields is great as well.

  • Josh Nederveld

    Does Craft include an Action / Filter API similar to WordPress as well?