Page 1 of 2

Migration from Wordpress (and others) to Serendipity

Posted: Fri Oct 08, 2004 12:11 pm
by garvinhicking
As some of our users already asked for, we need an easy import from a wordpress article base to serendipity.

Since both systems are SQL based, it should be fairly easy, to convert comments+articles from one table to the other; something like this:

Code: Select all

$wordpress = mysql_query("SELECT * FROM wordpress_comments");
while ($row = mysql_fetch_array($wordpress)) {
    mysql_query("INSERT INTO serendipity_comments (entry_id, comment) VALUES ({$row['eid']}, {$row['wp_comment']})");
}
(of course with proper escpaing and correct column names.

Is someone experienced with both systems enough to check on a SQL comparison and write up a similar script? We would supply this script with our standard distribution, if anyone is willing to volunteer :-)

Thanks on behalf of the Serendipity-Team,
Garvin.

Posted: Fri Oct 08, 2004 12:38 pm
by stephan:guest
It would be great to have the conversion script maintain author names, categories and comments. Maybe even automatic creation of categories if that is possible, like a one-click-update script ;-)

Stephan

Posted: Fri Oct 08, 2004 12:43 pm
by romulus
I could only provide an wp sql dump but I would be no really help for coding the conversion.

Posted: Fri Oct 08, 2004 3:17 pm
by stephan:guest
Maybe this helps, it is a script to convert WP to Movable Type. It doesn't support multiple categories for an entry, but that might be solved by adding another JOIN statement:
http://www.papascott.de/examples/export_wp.phps

Source and annotations:
http://www.papascott.de/archives/2004/0 ... /index.php

Stephan

Posted: Sat Oct 09, 2004 6:50 pm
by tadpole
I'm guessing this post was inspired by my MT code? Anyways, I'm planning on going through the list of competing software one by one, and WP is next.

Posted: Sun Oct 10, 2004 10:41 am
by stephan:guest
Awesome, tadpole. This is going to be great news for all wannabe-switcher :-)

Stephan

Posted: Mon Oct 11, 2004 1:15 am
by randybrown
A WP to s9y conversion util would be great. If I can help, let me know.

Posted: Mon Oct 11, 2004 3:34 am
by tadpole
Done. Well, mostly--there's a bit to do i18n-wise... Please test it, and if you find any bugs just leave a comment on that entry. Thanks.

Posted: Tue Oct 19, 2004 12:38 am
by stephan:guest
I haven't tried the script yet, but will I be able to retain my old URLs for entries? Right now they take the form of weblog.domain.com/archives/2004/10/18/title-of-entry/ and I would like to keep them in order for people to maintain their bookmarks.
Any idea on this (or does the script and some .htaccess magic already take care of this)?

Stephan

Posted: Tue Oct 19, 2004 6:02 am
by tadpole
In its current incarnation it won't, but I have written a plugin that takes allows for MT-compatible archives. Take a look at it--it should be extremely easy to adapt to your archive format. If you don't know how let me know and I'll do it for you :)

Posted: Tue Dec 21, 2004 2:16 am
by Westpoint
Please, can someone write a converter from boastMachine (bMachine) to Serendipity?

I use bMachine for about 2 month and wrote 112 articles to my blog, but this software has to many bugs, so I want to change the blog-software without starting at zero :?

Thx for your help :D

Vincent

Posted: Tue Dec 21, 2004 3:35 am
by tomsommer
Westpoint wrote:Please, can someone write a converter from boastMachine (bMachine) to Serendipity?

I use bMachine for about 2 month and wrote 112 articles to my blog, but this software has to many bugs, so I want to change the blog-software without starting at zero :?

Thx for your help :D

Vincent
bMachine? what happened to pMachine?

I'll give it a shot.

Posted: Thu Dec 23, 2004 6:22 am
by Westpoint
Do not need a converter any more.

I 'converted' the db using copy'n'paste in a text-editor - 8,5 hours of work, headache and finding errors... But now it works, I even had the time to 'recreate' my template so that it looks like my boastMachine-template.

Very nice peace of work you made :D Thx!

- Vincent

Posted: Thu Dec 30, 2004 4:25 pm
by javaravyn
tadpole wrote:In its current incarnation it won't, but I have written a plugin that takes allows for MT-compatible archives. Take a look at it--it should be extremely easy to adapt to your archive format. If you don't know how let me know and I'll do it for you :)

Tadpole,

I went and checked out your plugin, but I am unsure what to name the directory or the php page within the dir.

Thx,
M@

Posted: Fri Dec 31, 2004 1:38 am
by tadpole
serendipity_event_mtarchives/serendipity_event_mtarchives.php