Migration from Wordpress (and others) to Serendipity

Discussion corner for Developers of Serendipity.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Migration from Wordpress (and others) to Serendipity

Post 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.
Last edited by garvinhicking on Wed May 24, 2006 2:31 pm, edited 1 time in total.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stephan:guest

Post 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
romulus
Regular
Posts: 49
Joined: Fri Sep 24, 2004 4:31 pm
Contact:

Post by romulus »

I could only provide an wp sql dump but I would be no really help for coding the conversion.
stephan:guest

Post 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
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post 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.
stephan:guest

Post by stephan:guest »

Awesome, tadpole. This is going to be great news for all wannabe-switcher :-)

Stephan
randybrown
Regular
Posts: 27
Joined: Sun Oct 10, 2004 10:05 pm

Post by randybrown »

A WP to s9y conversion util would be great. If I can help, let me know.
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post 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.
stephan:guest

Post 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
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post 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 :)
Westpoint

Post 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
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post 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.
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
Westpoint

Post 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
javaravyn
Posts: 3
Joined: Tue Dec 28, 2004 10:44 pm

Post 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@
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post by tadpole »

serendipity_event_mtarchives/serendipity_event_mtarchives.php
Post Reply