• Resolved MrsCassandra

    (@mrscassandra)


    Hi,

    I am trying to use the WP Importer to import posts.

    I have created the XML file manually and I’ve checked the format several times, but all seems fine.

    It ony imports the first item though and can’t understand why.

    I’ve had a look around but didn’t find any solution.

    Any thoughts?

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter MrsCassandra

    (@mrscassandra)

    In case it can help this is a sample of the xml code.

    <xml version="1.0" encoding="UTF-8">
    
    <rss version="2.0"
    	xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
    	xmlns:content="http://purl.org/rss/1.0/modules/content/"
    	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    	xmlns:dc="http://purl.org/dc/elements/1.1/"
    	xmlns:wp="http://wordpress.org/export/1.2/"
    >
    
    <channel>
    	<wp:wxr_version>1.2</wp:wxr_version>
    
    	<item>
    		<title>Velvet jacket M</title>
    		<link></link>
    		<pubDate>Mon, 15 Apr 2013 17:34:17 +0000</pubDate>
    		<dc:creator><![CDATA[acreatorname]]></dc:creator>
    		<guid isPermaLink="false"></guid>
    		<description></description>
    		<content:encoded><![CDATA[This is my text. It also includes commas and letters with accets.
    
    		<img alt="Velvet jacket M" src="http://www.sample.come/files/ximage.jpg" width="300" />
    
    		]]></content:encoded>
    		<excerpt:encoded><![CDATA[Velvet jacket, no sleeves, silver buttons...]]></excerpt:encoded>
    		<wp:post_id>1</wp:post_id>
    		<wp:post_date>2013-04-15 17:34:17</wp:post_date>
    		<wp:post_date_gmt>2013-04-15 17:34:17</wp:post_date_gmt>
    		<wp:comment_status>closed</wp:comment_status>
    		<wp:ping_status>closed</wp:ping_status>
    		<wp:post_name>velvet-jacket-m</wp:post_name>
    		<wp:status>publish</wp:status>
    		<wp:post_parent>0</wp:post_parent>
    		<wp:menu_order>0</wp:menu_order>
    		<wp:post_type>post</wp:post_type>
    		<wp:post_password></wp:post_password>
    		<wp:is_sticky>0</wp:is_sticky>
    
    		<category domain="category" nicename="jackets-and-coats"><![CDATA[Jackets and Coats]]></category>
    		<wp:postmeta>
    			<wp:meta_key>Model</wp:meta_key>
    			<wp:meta_value><![CDATA[X10]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>Quantity</wp:meta_key>
    			<wp:meta_value><![CDATA[1]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>Price</wp:meta_key>
    			<wp:meta_value><![CDATA[60.0000]]></wp:meta_value>
    		</wp:postmeta>
    	</item>
    
    </channel>
    </rss>
    Thread Starter MrsCassandra

    (@mrscassandra)

    I have found another post that gave me some clue about the possible solution.

    The issue was likely related with post having the same date and mostly the same pos_id tag.

    So it is important that all posts in the xml file have different times (pubDate, wp:post_date, wp:post_date_gmt) and post_id or, as I did, no post_id tag all.

    🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP Importer only imports first post’ is closed to new replies.