Importing to Wordpress Using Custom Fields
November 16, 2009 2:15 PM
Subscribe
When importing data into Wordpress, is it possible to put parts of that data into custom fields?
I've got a (Drupal) website with about 1000 pages of content that I'd like to port over to Wordpress. The pages are essentially products, so I think they'd function well as posts.
The one snag I'm running into is that the Drupal pages have the product's content split into a few different sections of content, for example "description", "accessories", "specifications".
Questions:
1) I'm thinking the easiest thing to do would be to have these additional sections be custom fields in Wordpress. When I import the data how can I import these extra sections as custom fields?
2) What's the best format to export the data (or perhaps the better question is, what's the best format to import the data into Wordpress). I have access to the data in sql format, and could write a script in PHP to grab the data directly from the database if need be. Should I manually insert the data into the empty Wordpress database? Or use one of the import methods described in the Wordpress codex?
posted by backwards guitar to computers & internet (2 comments total)
If you want to go with a built-in import tool, though, writing the old data out in WXR (Wordpress eXtended Rss) format is the way to go. WXR is, I think, the only format that will let you do arbitrary custom fields out of the box. The documentation for WXR is a bit sketchy, so what I did (before abandoning that approach because I just had too much data to import) was to make a clean Wordpress installation, create a few posts in it the way I wanted the final site to be, and then export those. Looking at the resulting file gave me a template to use for the old data.
posted by hades at 7:56 PM on November 16