Support » Fixing WordPress » Import from blogware .xml file to wp

  • I’m trying to import my blogware ( blog.
    Blogware generates an xml file that I uploaded as instructed to the wp-admin directory and then edited the import-rss.php file.
    When run, it seems to find the file, and then gets to the “have fun” prompt as if it’s done.
    Nothing imported.
    I think maybe it doesn’t think the file is valid or something?
    The format is specified by blogware when it creates the xport so I can;yt really do anything with it on that end.
    Is there another importer or a tweak for this one to make it import blogware’s xml file?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I just got it to work. There seems to be two problems:

    1. The import-rss.php file is looking for a <title> tag, but there isn’t one. Blogware exports the entries with a <title=”article”> or <title=”photo”> type of tag.

    2. The excerpts that Blogware exports seems to be problematic. The import-rss.php file *seems* to read in the title, date, etc that it wants and then assumes the rest is the actual entry. Not true in Blogware’s case – the excerpt comes before the body.

    To solve problem 1:

    In the import-rss.php file, find the line that says:

    preg_match_all(‘|<item>(.*?)</item>|is’, $importdata, $posts);
    and change it to:
    preg_match_all(‘|<item type=”article”>(.*?)</item>|is’, $importdata, $posts);

    To solve problem 2:

    Find the line that says:
    preg_match(‘|<description>(.*?)</description>|is’, $post, $content);
    and change to to read:
    preg_match(‘|<body>(.*?)</body>|is’, $post, $content);

    I also changed the line that said:

    preg_match(‘|<pubdate>(.*?)</pubdate>|is’, $post, $date);
    preg_match(‘|<pubDate>(.*?)</pubDate>|is’, $post, $date);

    But I’m not sure that was required.

    With respect to point number 1: This will only import your articles. If you have photos, reviews, whatever else, then you will have to manually change the <item type=”article”> to <item type=”photo”> and then run it again. Then change it to <item type=”review”> and run it again..and so on until all your different post types are imported.

    There is syntax to tell preg_match() to look for <item type=” and then any string, but I’m too tied up with somethig else right now to look for it.

    I would also recommend cutting everything but your first entry out of your Blogware export file while you screw around with this. That way, if you screw it up and only the titles (for example) import, then you don’t have to go into WP and delete 300 articles. Yes…..I’m giving you this for free 🙂

    Please keep in mind that I hacked this together in about 2 minutes so there’s no guarantee that I’m totally correct or that this will work for everyone. If you have problems, post ’em and I’ll see what I can do.


    I didn’t even get that far. When I try to import the blogware.xml I get the following error message, “The uploaded file exceeds the upload_max_filesize directive in php.ini.”

    How do I / Where do I find the max filesize directive?


    It says clearly: in php.ini.
    If you don’t have access to it (most of us don’t on a shared/hosted environment) – ask your host to help you, increasing – at least temporarily – the max file size.

    That explains why I couldn’t find it. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Import from blogware .xml file to wp’ is closed to new replies.