Migrate your iweb Blog to Wordpress

 

I had to migrate my private Blog about my 2 years old little daughter from Apples mobileme servers to a wordpress account.

I wanted to keep all the comments too (Marlas birth..). So i wrote a perl script to do the job. It is far from beeing perfect, but it works for me. So it may work for you too. You have to adjust some things, that‘s for sure.


Features:

-Keep Comments

-Keep Images (hmm mostly)

-Sets email-adresses for comments by Name

-Sets Tags by text strings occured in title or body

-Free, but my daughter will get every euro you donate! THX!


Note: The script works only while the apple servers are up. After 30. June all your comments are gone!




Download iweb2wordpress.pl.zip


New 06.06.12:

Download iweb2wordpress.pl.1.5.zip


Instructions:

  1. 1.Adjust the Scipt with a normal texteditor (textedit f.ex.)

    Your old Blog adress:

    # ------------------------

   # old adress

   my @blog_urls = ('http://web.me.com/juliekaye/Site/Julies_Blog/blog-archive.xml'

    It has to be the me.com adress, not the mac.com!


    In the section „new adress“ you have to set the configuration of your new blog

    # ------------------------

    # new adress

    $VAR{'base_site_url'} = 'http://test.weinschenks.com';

    $VAR{'base_blog_url'} = 'http://test.weinschenks.com';# mostly the same as base_site_url

    $VAR{'base_upload_url'} = 'http://test.weinschenks.com/wp-content/uploads/';# url to upload dir

    $VAR{'author_login'} = 'Author';

    $VAR{'author_display_name'} = 'Author';

    $VAR{'author_email'} = 'noemail@internet.de';

    $VAR{'author_first_name'} = 'First';

    $VAR{'author_last_name'} = 'Last';

    $VAR{'language'} = 'en';



    In Section „from to“ you can set limits for exporting posts. Starting with 0-5 is a

    good idea:

    # ------------------------

    # from to

    # set to 0 for unlimited

    my $start_id = 0;

    my $end_id = 0;

    my $limit = 100;# posts per file


    May be you have to adjust the pattern of your used shylesheet classes

    my $para_pattern = "(paragraph_style.*|.*style_1|Body)";

    The script has to find your content/text and i identifies it by the css shyle of your

    paragraphs. Every blog can different in that way.


    There are several more possible confiuration entries, but i can‘t explain all in

    detail. The Pro looks into the code, the others have to ask by explicit upcomming

    problems. (sorry, can‘t do that my time is limited and the script only works for 3

    more weeks)


    SAVE your modifications!!!


  1. 2.Run

    open terminal (shipped with your mac. type terminal into spotlight)



    goto your directory where you extracted the archiv:

    cd /Volumes/Macintosh HD/Users/mirko/Downloads <ENTER>

   

    Start the script:

    perl ./iweb2wordpress.pl

   

    The resulting .xml is found in the same directory


  1. 3.Import into Wordpress


Tipps:

  1. 1.Import first without images in Wordpress

  2. 2.Import same file again with images

  3. 3.if you can adjust running time for scripts on your hosting service

  4. 4.if you have to start over, delete ALL images and content before importing again


Pro Tipp: I have included a modified version of the Wordpress import script. It has the ability to bypass a execution time limit on your webhost by refreshing after x seconds by itself. (you can adjust it in line 541 if ($laufzeit > 30) { )



Apple Discussions