Import post from non-wp site to wp site

I am setting up a new wp website for a client. Their current website is not wp. They have about 300 posts that need to be moved to the new site from the old site. I am able to do a csv import, but there is still a lot of work to do on each post. I would like to do an xml import to set a number of fields. My question is about setting up this xml data. I can use the export of a post on the new site as an example, but I don't know if there is another better way. Or if I create the xml file, what do I have to watch out for? For example, in the permalink, there is a 'p=9999' value. Do I need to set that to something so it would work?

Related to this, I also want to import pictures and match them to the imported posts. How do I do that?

  • Charlotte

    Ok, well doing manual copy/paste would have the potential of introducing many errors. I found a skeleton xml file which I am using and I'm writing a php program to build the full xml file. That is working.
    I still wonder how to add the images for the posts. I understand that images are stored in the wp_post table as type attachment. How do I associate the image to the new post? What field in the xml would hold that?
    I am thinking that I need to import the images first, return their ids in the db, then update the appropriate xml item record with the id. Is that the right series of steps? And what is the field in the post xml to update?
    Or can someone point me to documentation that can help me answer this question?
    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.