Challenge for All You WordPress Wizards!

I’ve got a challenge for those of you who consider yourselves to be WordPress wizards…

My client inherited a (badly designed) web site running on WP 2.8.5. I’m redesigning the site and putting WP 2.9.2 behind it. Her current site uses an elaborate hierarchy of categories and posts. I’ve been able to duplicate the hierarchy but hit a brick wall when trying to figure out how to get the content from her current site to the new one. Her wp_posts table has about 6,000 rows, although many are “post revisions”. I think in reality there are about 1,200 actual posts spread among about 120 categories.

I can’t do the WordPress export / import dance because I think it will break a lot of stuff I’ve got set up for the new site. I really just need to transfer the posts data and don’t want to mess with anything else. I’ve tried doing a raw SQL table export, thinking I could tweak a few things then do a bunch of SQL “INSERT”s on the new site. But there seem to be some wp_posts table changes between 2.8.5 and 2.9.2, plus I think there may be some foreign keys that won’t get set up correctly.

I hate the thought of having to manually re-enter all the content, post by post. Even if it took only one minute to do each one, I’d need about 20 hours to get everything in there. There’s got to be a better way, right? (Please?)

Does anyone have any clever ideas on how I can do this other than brute force?

@ipstenu – OK, that gets rid of the rows that are revisions. But I don’t think I can just import the wp_posts table into the new database in isolation. Aren’t there keys into other tables that would not get set properly? And what about category IDs?

The current site is live and I’m doing the new site on a development server, so the server name will be different. But I don’t think that’s a big deal. I’m comfortable enough looking at SQL and tweaking raw code.

My concern is that simply bringing the entire old database over will break a lot of stuff in the new site. The current site has a certain combination of pages and posts (and I mean that in the WordPress way). The new site has a certain, but different, combination of pages and posts. Plus, some categories (and their hierarchy) have changed. So there’s not a 1:1 matching from the current site to the new one.

I guess I was hoping there was a way to export just the posts from one site, then import them into the new one, while leaving everything else alone. I suppose I could do a full db backup on the new site, then try your suggestion to see what happens. But I anticipate a lot of problems, if the site even loads in a browser.