This script will help you migrate from Serendipity to Wordpress. It is a plugin that you drop into Wordpress that will read your S9y database and migrate over your posts and comments.
There was none when I started, so there shall be none when I'm done. -JD
Public Domain or CC0
IF YOU HAVE MORE THAN 9000 POSTS OR COMMENTS: Please change the "+9000" and "-9000" below (3 locations total) to be a number larger than what you have. It is arbitrary, but important to prevent ID collisions during update.
- Install Wordpress as normal
- In the Wordpress DB
TRUNCATE wp_posts;
TRUNCATE `wp_postmeta`;
TRUNCATE `wp_term_relationships`;
TRUNCATE `wp_term_taxonomy`;
TRUNCATE `wp_comments`;
TRUNCATE `wp_commentmeta`;
DELETE FROM wp_terms WHERE wp_terms.term_id!=1;
- Copy included serendipity.php to /wordpress/wp-admin/import/
- Login to Wordpress Admin Interface
- Goto Tools > Import
- Click "Serendipity"
- Fill out the information, follow the proccess
- Run the following SQL in the Wordpress DB
UPDATE `wp_comments` as a SET a.`comment_post_ID`= (SELECT b.`menu_order` FROM `wp_posts` as b WHERE a.`comment_post_ID`= b.`ID`);
UPDATE `wp_term_relationships` SET `object_id`=`object_id`+9000;
UPDATE `wp_term_relationships` as a SET a.`object_id`= (SELECT b.`menu_order` FROM `wp_posts` as b WHERE a.`object_id`-9000= b.`ID`);
UPDATE `wp_posts` SET `ID`=`ID`+9000;
UPDATE `wp_posts` SET `ID`=`menu_order`, `guid`=CONCAT("http://MYURL.COM/?p=",`menu_order`), `menu_order`=null; -- Replace MYURL.COM with your URL
SELECT `id`+1 FROM `wp_posts` ORDER BY `id` DESC LIMIT 0,1;
ALTER TABLE `wp_posts` AUTO_INCREMENT = XXX; -- Where XXX is the value returned from the select above
- Should be done.
- Comments become "flat" (IE "parents" aren't translated)
- After the import, you'll need to edit one of the categories (just open and save it) to fix the hierarchy.
GitHub Move (2013-07-13) - Jon Davis
- Migrated code from Google Code to new home on GitHub
- http://snowulf.com/2013/07/13/s9y-to-wp-has-a-new-home-on-github/
Version 1.7 ( 2012-03-15 ) - Abdussamad Abdurrazzaq
- fixed user import
- minor cleanups and removal of deprecated code.
- http://web.archive.org/web/20120719111540/http://abdussamad.com/archives/473-Converting-from-Serendipity-to-WordPress.html
Version 1.6 Released ( 2012-02-15 ) - Abdussamad Abdurrazzaq
- Support for nested comments
- Works as a plugin in WordPress
Version 1.5 Release (2010-10-27) - Simone Tellini
- Added support for nested categories
- http://tellini.info/2010/10/serendipity-to-wordpress/
Version 1.4 Release (2010-06-10) - Jon Davis
- Added draft/publish handling
- Added method to get post numbers to match on either side (see readme.txt file)
- Tested with S9y 1.5.2 to WP 2.9.2/3.0RC
- http://snowulf.com/2010/06/11/serendipity-to-wordpress-post-import/
- Code borrowed with permission from Dobschat.de
Version 1.3 Released (2008-11-08) - Dobschat
- split articles with
<!--more-->
- import article-tags from s9y
Version 1.2 Released (2008-09-04)
- Fixes Category Association
- Breaks processing into smaller blogs for large imports
- Performance improvements
Version 1.1 Released (2006-02-01) - Dobschat
Version 1 released - Dobschat