BlogCFC Export/Import Code

This post is more than 2 years old.

I'm now in the export/import business. Well, kinda. If you use BlogCFC and need a tool to export/import your blog entries, download the attachment below. This was tested with the latest 5.9 build of blogcfc. It outputs to WDDX files in a specified folder. You can then use the import comment to read in those WDDX files to a new BlogCFC instance. This may become an official BlogCFC tool for V6, but for now it is an unsupported utility.

A big thank you to digital primates. They needed the tool and paid me to development, then said they were cool with me giving it to the world.

Download attached file.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Daniel Greenfeld posted on 11/30/2007 at 7:56 PM

How about a JSON import/export? CF8 supports it nicely, and so does... ahem... the rest of the world. Using it instead of WDDX would mean that people could more easily import from other languages into blogCFC.

Comment 2 by Raymond Camden posted on 11/30/2007 at 7:57 PM

BlogCFC is supported on CF6 and 7 though. I could have included the nice JSON CFC I use for Lighthouse Pro, but I wanted a super simple set of scripts.

Comment 3 by James Buckingham posted on 11/30/2007 at 8:44 PM

Bit of a sideline to that subject - I actually wrote a tool to automate the export of my Blogspot blog into BlogCFC :-). It wasn't bullet-proof because the layouts were slightly out afetr but in terms of the server-side it saved me so much time!

I don't know if that's something that would interest you Raymond?

Comment 4 by Raymond Camden posted on 11/30/2007 at 10:40 PM

Not sure - but send it and I can share it on blogcfc.com.

Comment 5 by Adam Tuttle posted on 12/1/2007 at 1:04 AM

Can you share a WSDL or otherwise explain the format of the import data? I'd like to write a script that converts wordpress export data into blogcfc import data, and I don't yet have a copy of blogcfc running to fill with dummy data and then export to figure it out manually.

Comment 6 by Adam Tuttle posted on 12/1/2007 at 1:05 AM

I don't know why I said WSDL. I meant XSD. At least I think I did... unless this is just another brain fart.

Comment 7 by Raymond Camden posted on 12/1/2007 at 1:08 AM

The data is WDDX. It's part of ColdFusion. CF can both serialize and deserialize it natively.

Comment 8 by Adam Tuttle posted on 12/1/2007 at 1:11 AM

I understand that, but in order for me to translate the data I export from WordPress (a blog app written in PHP), I need to know what the data elements are and how to structure them.

Comment 9 by Raymond Camden posted on 12/1/2007 at 1:13 AM

Oh - um - well, all I did was serialize the data from my blogcfc tables. You could make a blank blogcfc install and serialize them.

Comment 10 by Roger Skalbeck posted on 1/4/2008 at 1:10 AM

The export/import works well with one note of caution for anybody using it to merge blogs: Be careful with user tables & avoid duplication at all cost. After creating a new blog on our development server, I exported it and tried to import to merge it with an existing blog with a different config directory. Yikes! I ended up duplicating users, which duplicated display for all blog entries, even though the actual entries table was correct.

After rolling back the database and manually changing the WDDX file for user names, I imported the same files again and all is right with the world. Thanks Ray (and digital primates). This was a great help.