Support » Fixing WordPress » Import Formats

  • jm3


    I am searching for documentation on the format(s) WordPress can import because I need to import 188 posts [1] from my current home-grown blogging system. These posts exist in both a mysql DB and as XML files on disk (flattened for publishing). What is the shortest path to get these imported into wordpress? I can export the posts to look like whatever format is the simplest; they consist only of titles, dates, and bodies with well-formed xhtml markup (no comments or additional metadata).

    I imported a test file in the MT export format [2] into WP using the import-mt.php template but it didn’t work — the post shows up in the wp-admin console but the post body is blank.

    Is the MT format that WP imports the same as the blog format that MT imports? or do they differ?

    thanks in advance,

    — jm3


Viewing 10 replies - 1 through 10 (of 10 total)
  • charle97


    the mt format is your best bet. since a series of hyphens is used as the delimiter, people usually have trouble importing because they use hyphens in their posts.



    That’s the format i tried but wordpress isn’t importing posts in that format, at least, not for me. I used the super-simple example from the MTImport documentation page, you can see the test file here: . (i changed the author name to me; that’s it.)

    But when I point import-mt.php to the test file and import it, import-mt *says* it imported the posts but they don’t show up in the admin console or on

    Am I missing a step where i have to approve the posts or something?



    Are you using 1.22 or a nightly? I know that a couple of months ago import-mt.php was malfunctioning in CVS and I don’t know whether it’s been fixed.



    Ah, I should have noted that: I’m running WordPress 1.2.2 “Mingusâ€?, downloaded January 1, 6:55 AM. (the readme.html says Version 1.2 but I assume that’s out of date).



    I’m kind of impatient to get started; is there any reason why i shouldn’t just bulk load the entries directly into the database?



    The import-mt.php imports a standard-format text file formatted as it would be by MT when it exports the posts, or when it imports them.

    You can also use the import-rss.php which is an RSS importer. You can modify it to import your xml format file, I guess.

    Bulk-loading entries into the db won’t be good, cause the posts should have to be assigned to categories, and that involves some tables and so forth.



    i just wrote a script to generate the SQL for bulk loading all the entries and category data, and set up the post-category associations in post2cat. it was easier for me than the import-mt script, (which failed for me on even the simple test case from mt’s documentation of their import format.) dunno.



    Which begs the question of HOW. I have a ton of stuff that I can also format in any format and set it up to include categories and other specific fields, whatever wp needs to import the data, but I can’t get a test to run either.

    How were you able to do this and how did you handle the field and line breaks and the quotes and apostrophes?

    I’d love to do this through PHPMyAdmin instead of WP if the process would be easier but I can’t seem to find documentation on how to import around the quotes. I have HTML and “quote” lines in my content field.


    I would also be thrilled to see a “generic xml” import script / example. I have a bunch of custom data files I would like to import, but would prefer to transform them into some basic “wordpress xml format” to import them than have to hack up an import script each time… But I suppose that is mostly my laziness talking. 😉


    I also had the problem, that the posts didn’t show up immediately.

    STATUS: publish

    to each post in the mt import file did it for me. Maybe this is obvious to other. Took me a while to find out.
    Best regards,
    Max Hoffmann

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Import Formats’ is closed to new replies.