#Announcements

Craft 3.1 Dev Preview is Here

Craft 3 1 Dev Preview Is Here

Craft 3.1 is coming later this year, and it will bring two major new features that we’re pretty excited about.

Soft Deletes

Have you ever accidentally deleted an entry in Craft and wished you could bring it back? Starting in 3.1, whenever you delete things, they will go into a “trashed” state for 30 days before getting fully deleted from the system. That means that there’s a 30 day grace period where deleted items can be recovered, if the deletion ended up being accidental.

Project Config

Most Craft projects live on at least two environments: a local dev machine and a production server. While that’s certainly a good thing, keeping those environments in sync can be a pain. Developers have tried various tactics using plugins, database syncing scripts, content migrations, and more, but none have been great.

That all changes in Craft 3.1, thanks to a new file named project.yaml.

project.yaml lives in your project’s config/ folder, and it stores info about your sites, custom fields, sections, category groups, tag groups, user groups, global sets, and more—all the things that define your project from a development perspective. It gets updated automatically as you work, and whenever Craft detects that external changes have been made to it, it will update its internal setup to reflect those changes.

So the next time you need to add a new section to an existing site, you won’t need to worry about how to make the exact same custom field and section changes on Dev and Production, or make sure that everyone on the team is running a recent database backup. Just commit your new project.yaml file alongside any other template or CSS changes you’ve made, and push them out. When they are deployed to a new environment, Craft will detect the changes, and apply them locally with the click of a button.

There’s more planned for 3.1, but we wanted to get these new features in developers’ hands right away, so today we’re kicking off the Craft 3.1 Dev Preview. If you’re interested in helping test, or want to add support for Soft Deletes and Project Config to your plugin, you can find installation instructions and plugin documentation on the Craft 3.1 Dev Preview Notes page.

Please note that Craft 3.1 Dev Preview is for testing and plugin development purposes only, and is not supported for production use! (Really!)

Prev
Meet the New Craftcms.com
Blog Home
Next
Craft 2.7 Released with PHP 7.2 Compatibility