WordPress.org

Ready to get started?Download WordPress

Forums

Import Formats (11 posts)

  1. jm3
    Member
    Posted 9 years ago #

    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

    [1] http://jm3.net/autolog/2004/index.xml
    [2] http://www.movabletype.org/docs/mtimport.html

  2. charle97
    Member
    Posted 9 years ago #

    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.

  3. jm3
    Member
    Posted 9 years ago #

    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: http://jm3.net/blog/wp-admin/test-data.txt . (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 http://jm3.net/blog/

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

  4. Anonymous
    Member
    Posted 9 years ago #

    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.

  5. jm3
    Member
    Posted 9 years ago #

    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).

  6. jm3
    Member
    Posted 9 years ago #

    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?

  7. carthik
    Member
    Posted 9 years ago #

    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.

  8. jm3
    Member
    Posted 9 years ago #

    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.

  9. Lorelle
    Member
    Posted 9 years ago #

    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.

    HOW?

  10. mistcat
    Member
    Posted 9 years ago #

    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. ;)

    -nate

  11. mhoffman
    Member
    Posted 8 years ago #

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

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.