Cms: Import/Export in Core

Created on 31 Jan 2017  路  20Comments  路  Source: craftcms/cms

Created by: Florian ([email protected]) on 2015/03/13 06:38:29 +0000
Votes at time of UserVoice import: 6


Actually believed this would have been one of the first Feature requests and was surprised to not see it here.

We have a ticket for "syncing" db's between installs which is basically an extension of a simple export/import between craft installs.

So here we go with this feature request: Clean Exports out of craft (and decide what can be exported and clean imports data/structure into craft)

enhancement utilities

Most helpful comment

Just added basic element exporting to all element index pages, for Craft 3.2:

Screen Shot 2019-04-02 at 7 33 52 PM

To help test, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "3.2.x-dev as 3.2.0-alpha.1",
  "...": "..."
}

Then run composer update.

All 20 comments

Throwing in my 2 cents here:

This would be crucial for us. On practically every project, we stumble through importing data, sinking tons of time and frustration into it.

Yes, there are plugins to do this. In my experience they have always been buggy, error-prone, with limited features. They can also wreak havoc on your database in ways you may not even be immediately obvious.

Why should this be included in core vs plugin?

  • A big reason is testing and reproducibly. In a system as dynamic as a CMS, content is often the culprit of uncaught bugs. Being able to consistently import the same data and run tests would a big step.
  • As CMSs go, this is a pretty common, and frequently "expected" feature.

yes please

A core function of a CMS should be to make it easy to get my data in/out

I'm using Craft because someone else selected it for a project, and this has been the biggest pain point for us. I've considered redoing the entire project to move to a new CMS that has solid import/export but haven't had the time yet. I don't like being so critical in an issue tracker, because I know how hard it is to prioritize the thousand features users always want and I'm sure you're doing your best, but you should know there's at least one person actively warning people away from Craft because of this.

Well said, @shaunagm. Good to hear a perspective from someone not already entrenched in the Craft ecosystem.

For the most, I should keep out of this, as have opinions and not the huge weight of need you who enable large sites do, as @angrybrad and @brandonkelly both know.

What I can offer though is why I'm sitting here working late nights and Saturday, which relates.

People in our closed Beta, when they finally opened up, just _had_ to have portable, repo-able, scriptable content for the much smaller database of Live Vue - so they can assure the presence of Craft Live Previews for content editors on their headless Spas.

It was a considerable push, even if we're just doing Gatsby first, and I heard the feelings. I'm making it -- in yaml for community lingua franca, and I'm handling all they don't realize of intricate issues inside, making them go away.

I know it's going to be really worth it, arriving soon.
I took the pause on other features and opportunities to get here.

Just added basic element exporting to all element index pages, for Craft 3.2:

Screen Shot 2019-04-02 at 7 33 52 PM

To help test, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "3.2.x-dev as 3.2.0-alpha.1",
  "...": "..."
}

Then run composer update.

Well, that's pretty amazing work, @brandonkelly Brandon.

You got me to try 3.2 as well :) . And, bang, _both_ items Just Worked :tm: . 20 minutes when I am well fatigued, winding down with graphics after succeeding on the last Parkour among the mazes.

It's on a server I could afford to knock down, and there was only one Entry there. But it came through immediately with what looks like its database surely.

You can see the Spanish song lyric from this Excel view -- I tried csv and xslx. Great contempo use of components, btw, And I will have to show you the robot that's begun to inhabit Live Vue...it's more than charm.

Respect.

Clive

brandon-s-surprise

Oh, yes. For anyone trying this and getting hung up with composer because they have PHP on their dev machine, but not extension to run phpoffice/spreadsheet, I learned a new thing this evening:

composer update  --ignore-platform-reqs

... will get you there.

Thank you, @brandonkelly!

We just announced that we鈥檝e acquired Feed Me, a popular content import plugin for Craft, and we鈥檝e made it free.

It鈥檚 a first step toward implementing content importing directly into core :)

Great stuff, @brandonkelly - congratulations!

Does anyone have a current solution for migrating data across multiple environments? Full database migration is not viable for us.

Why is the Matrix field type left out of it?

@cosly All custom fields are currently excluded from export. We will be working to improve export options and also introduce element importing in a future release, which is why this issue is still open.

https://github.com/craftcms/cms/issues/4484
@cosly see this related issue

What's a good workaround for exporting entries with custom fields while we wait for Craft 4? Is there a recommended plugin for this?

https://github.com/superbigco/craft-reports seems unfinished, and https://github.com/kffein/Craft-export-Csv doesn't support relations or nested fields either. :/

You could use Element API to create a custom JSON feed that has exactly what you need in it.

@KatieMFritz For what its worth, Reports is unfinished but working. Feel to reach out directly with any questions or feedback.

@KatieMFritz GraphQL is a credible export solution as well. I was able to get it up and running and learn the syntax very quickly and now I鈥檓 thinking of building my whole front-end with it! But it would also be a good way to quickly create a JSON file with all of your entry data including custom fields, matrix fields, etc.

I was just looking how to easily import/export entries in Craft.
Export with Element Exporter is really easy but importing with Feed Me requires me to map all fields manually...

For example, I have local dev site and production site. All structures between them are the same because I can just copy the project config. But I cant easily copy entries... (other than dump DB and do it manually...).

So I hope for some solution that lets me easily import entries exported with element exporter.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darylknight picture darylknight  路  3Comments

leigeber picture leigeber  路  3Comments

angrybrad picture angrybrad  路  3Comments

angrybrad picture angrybrad  路  3Comments

mattstein picture mattstein  路  3Comments