Link to home
Create AccountLog in
Avatar of jason_mcguire
jason_mcguireFlag for United States of America

asked on

Importing Categories into WordPress using RSS

Hello,

I am trying to import over 10K categories into WordPress, and all 10K should map to a parent category.  
Can someone please show me how to create an RSS file (xml) that would allow me to import the sample categories mapped to a parent category using WordPress's Import RSS file capability?  

I exported my wordpress db using the Export functionality.  I examined the file, and tried to create my own using Excel and then copying/pasting my concactenated fields into an XML string.  I then pasted it into notepad and saved the file as import.xml.  I then tried to Import the xml file into WordPress using Manage > Import > RSS.    

However, I am unable to get it to import and create the categories mapped to a parent category.

Here is contents of the import.xml file I created:

<wp:category><wp:category_nicename>insurance-news</wp:category_nicename><wp:category_parent>Financial News</wp:category_parent><wp:cat_name><![CDATA[Insurance News ]]></wp:cat_name><wp:category_description><![CDATA[Insurance News]]></wp:category_description></wp:category>

Any assistance is much appreciated!  I just want WordPress to automatically create the new categories and map them to a parent category.  

Thanks!

Jason

Avatar of dosth
dosth
Flag of India image

your import files should be like this.

your file need to have the parent category defined on top and below that all its sub category
<wp:category>
<wp:category_nicename>financial-news</wp:category_nicename>
<wp:category_parent></wp:category_parent>
<wp:cat_name><![CDATA[Financial News]]></wp:cat_name>
<wp:category_description><![CDATA[Financial News]]></wp:category_description>
</wp:category>
<wp:category>
<wp:category_nicename>insurance-news</wp:category_nicename>
<wp:category_parent>Financial News</wp:category_parent>
<wp:cat_name><![CDATA[Insurance News ]]></wp:cat_name>
<wp:category_description><![CDATA[Insurance News]]></wp:category_description>
</wp:category>

Open in new window

Avatar of jason_mcguire

ASKER

Hello dosth.  Thanks for the reply.

I saved code you provided as import.xml, and then tried to import it into wordpress v2.51.  However, it did not work.  Please try it yourself and let me know what the issue is.  The parent category "Financial News" is not importing and neither is the subcategory "Insurance News"

I am attaching the import.xml file for your reference.  You can remove the .txt extension.  

Thanks,
Jason
here is the file.
import.xml.txt
pls try this file
import.xml.txt
Hello dosth,  I saved the file you attached as import.xml, imported it into wordpress, and it did not work.  The categories were not created.  

Let me know if you know what the issue is.  Thanks.

Jason
ASKER CERTIFIED SOLUTION
Avatar of dosth
dosth
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I got it working!  Thanks dosth!!  I was using the RSS import link instead of the WordPress one.  

Jason
Thanks