Skip to content

ShakataGaNai/s9y-to-wp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

s9y-to-wp

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.

License

There was none when I started, so there shall be none when I'm done. -JD

Public Domain or CC0

Instructions

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.

  1. Install Wordpress as normal
  2. 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;
  1. Copy included serendipity.php to /wordpress/wp-admin/import/
  2. Login to Wordpress Admin Interface
  3. Goto Tools > Import
  4. Click "Serendipity"
  5. Fill out the information, follow the proccess
  6. 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
  1. Should be done.

Known issues

  • 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.

History & Change log

GitHub

GitHub Move (2013-07-13) - Jon Davis

Version 1.7

Version 1.7 ( 2012-03-15 ) - Abdussamad Abdurrazzaq

Version 1.6

Version 1.6 Released ( 2012-02-15 ) - Abdussamad Abdurrazzaq

  • Support for nested comments
  • Works as a plugin in WordPress

Version 1.5

Version 1.5 Release (2010-10-27) - Simone Tellini

Version 1.4

Version 1.4 Release (2010-06-10) - Jon Davis

Version 1.3

Version 1.3 Released (2008-11-08) - Dobschat

  • split articles with <!--more-->
  • import article-tags from s9y

Verison 1.2

Version 1.2 Released (2008-09-04)

  • Fixes Category Association
  • Breaks processing into smaller blogs for large imports
  • Performance improvements

Version 1.1

Version 1.1 Released (2006-02-01) - Dobschat

Version 1

Version 1 released - Dobschat

About

Serendipity to Wordpress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages