Why You Should Update to Craft 3 ASAP
Trevor Davis, Former Front-End Development Technical Director
Article Categories:
Posted on
Updating to Craft 3 means new features for your site with improved performance and security. This latest version was released earlier this year, and you should update as soon as possible!
At Viget, we've been huge fans of Craft CMS for years. After a significant amount of time spent rewriting the entire app, Craft 3 was officially released on April 4, 2018; and if you haven’t updated, you need to! It’s a little time intensive to complete this update, but it’s totally worth it in the long run.
New Features
Craft 3 is a complete app rewrite from Craft 2. With that comes a whole host of new features:
Speed
Yii, the underlying framework of Craft, has been updated to version 2. This update has given Craft 3 a massive speed boost.
Multi-site
Craft 2 had native multi-locale support, but now Craft 3 has native multi-site support. This means you can manage multiple Craft sites from a single install. It even works across domain names! This makes it extrememly straightforward to setup your site in a different locale or to create a micro-site within the same Craft install.
Image Editor
The new image editor in Craft 3 enables a user to edit an image without leaving the control panel. Images can be rotated, cropped, and the focal point can be defined for crops. I would expect even more image editing functionality to be added in the future.
Plugin Store
No longer are you stuck downloading zip files of plugins. Craft 3 now features a browsable list of plugins that can be installed and purchased (when necessary) directly in the control panel.
Bugs, Security, and New Feature Development
This is probably the most important item on the list. Making sure your application is up to date and secure will help to protect your data. With the release of Craft 3, Craft 2 will support bug fixes through March 31, 2019 and security fixes through March 31, 2020. That bug fix date is approaching very quickly, so it’s important to get ahead and update to Craft 3 now.
Along with bug and security fixes, being on Craft 3 means new feature development! Craft 3.1 is just around the corner with sweet new features like Project Config and Soft Deletes.
Developer Highlights
With a complete app re-write, there are certainly plenty of new features for developers too. Here are a few of the most impactful ones:
Debug Toolbar
No longer do you need to dig through your browser console to debug a request. Now there is a fully featured debug toolbar visible to profile and debug the current request.
To enable once you have updated to Craft 3, visit your user account, go to preferences, and then you will see two checkboxes:
- Show the debug toolbar on the front end
- Show the debug toolbar on the Control Panel
Access the Craft Service API in Templates
Previously, you could only access the services that Craft made available to templates, but now you can now access all of the Craft service API in your templates. Need to get a category group by its handle? Sure, that's easy enough:
{% set group = craft.app.categories.getGroupByHandle(groupParam) ?? null %}
This pushes Craft beyond a "content management system" and to me, Craft has become a "framework" to build on.
Command Line Interface
In addition to being installable via Composer, Craft also provides a CLI for executing a number of tasks: setup, running migrations, clear caches, and more. Plugin developers can add additional commands.
Improved Background Processes
Let’s face it, background tasks in Craft 2 weren't the best. They got stuck all the time. Craft 3 replaces background tasks with a job queue that is much more reliable.
MariaDB & Postgres Support
Craft 3 adds support for MariaDB and Postgres, in addition to MySQL of course.
Modules
You can now add custom Yii modules to Craft with ease. Essentially, modules are plugins, but without some additional functionality that Craft provides (installation, settings, enabled/disabled, etc). Modules are useful if there is specific core functionality that will never need to be uninstalled.
Conclusion
Get updated as soon as you can! The best place to get started is the upgrading section in the Craft docs. Since Craft 3 is such a major release, you’ll likely need help from someone with strong technical Craft knowledge (this one isn’t as easy as a one button click to update). If there’s any way we can help, let us know.