Craft CMS | Self-Hosted WordPress Alternatives Part 1

FavoriteLoadingAdd to favorites

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:


    
{% block content %}

If you see me, you haven’t set your {% verbatim %}{% block content %}…{% endblock %}{% endverbatim %} yet.

See Twig’s Template Inheritance documentation for an explanation.

{% endblock %}
Copyright {{ now.year }} {{ craft.request.serverName | ucfirst }}. All rights reserved • Built with Craft

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.

The post Craft CMS | Self-Hosted WordPress Alternatives Part 1 appeared first on Delicious Brains.

Click to visit original source at DeliciousBrains.



Categories: Wordpress

Tags: , , , ,

Subscribe

Subscribe to this Journal

Subscribe to our Saturday morning digest of each week's new content. ITS FREE!

Email address