Importing to Wordpress Using Custom Fields
-
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?
-
Answer:
I'm in the middle of a similar project right now, and I'm going with the "write a script to pull it out of the old db and shove it into the new one" approach. 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.
backwards guitar at Ask.Metafilter.Com Visit the source
Other answers
Thanks Hades, that's sort of what I've started doing. I think I want to implement some custom taxonomies, so I might have to use your technique to see how WXR spits them out.
backwards guitar
Followup: I didn't have much luck with importing taxonomies, but I did use the WXR method - creating my own xml file and using custom fields in the XML - to add the separated data.
backwards guitar
Related Q & A:
- How to set/change another post author by custom fields or something else?Best solution by WordPress
- How do I add custom attributes to javascript tags in Wordpress?Best solution by WordPress
- How to skip columns empty in CSV file when importing into MySQL table using LOAD DATA INFILE?Best solution by Stack Overflow
- How can I display older custom post outside the loop in Wordpress?Best solution by Quora
- How to add WooCommerce Custom Product Fields?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.