Geeklog to WordPress converter

I’ve been intending to convert my blog from Geeklog to WordPress for probably the better part of a year.  I’m a stickler for preventing dataloss though, and I really wanted to keep all my old blog posts.  I searched the web on and off for a month or two looking for a way to convert the data, and the best I could find was the RSS import in WordPress.  Unfortunately, the RSS export in Geeklog sucks rocks, and even hacking on it a bit, I couldn’t get all the data out in one piece.

So I finally gave up searching and wrote my own WordPress import module for Geeklog that would copy and translate the data directly from one database to the other. It’s heavily based on the existing importer for TextPattern that’s included with the current WordPress distributions.  It imports categories, users, posts, and comments.  It also stores the Geeklog Story ID (sid) into the post metadata, for use in making the old permalinks keep working.  I have an article.php stub you can drop into your wordpress directory that takes the Geeklog permalinks and redirects to the new WordPress ones.

I’m posting this here so the next person who has to convert a Geeklog to a WordPress can save themselves a bunch of trouble. :)  It’s all been posted to WordPress’ Trac system.  If you make use of it and make any improvements to it while you’re at it, feel free to add them to that bug.

65 thoughts on “Geeklog to WordPress converter”

  1. hi, thanks for the good importer – it helped me a lot.

    following your post on the trac website: “It pretty much does what I needed it to do, and I’m sure someone else can make use of it, and possibly clean it up better.”, i made use of it, extended it in a way that it does pretty much what i needed it to do and i am hoping that someone possibly will clean it up better …

    things i have added are import of links, import of static pages, import of article images, and a list of pages where i have to change geeklog autotags manually.

    as i am new to wordpress, i have no idea where to post an importer so i have put it on an wordpress site:


  2. I’m trying to convert my GL 1.4.1 website to WordPress 2.7 and I’m running into some problems.

    First of all, the database for my existing site is very large with 441.2 MiB total in the tables. I have almost 8,000 articles that I want to import and migrate to WordPress.

    I copied the geeklog.php file into the “{wordpress}/wp-admin/import/” directory, but when I then went there to try to use the script I had this error waiting for me:

    Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/panamax/public_html/wordpress/wp-admin/import/geeklog.php on line 56

    In the geeklog.php file at line 56 there’s this:

    static private function read_url($url) {

    Any comments or ideas?

    Has anyone else successfully converted a GL 1.4.1 site to WP 2.7?

    Should I drop back and use JustDave’s original script?

    Any help would be greatly appreciated. Thanks.


  3. Update: Tobias contacted me and the problem was that I was running PHP version 4.4.6 and his script is written for PHP 5. I have asked the host sys admins to upgrade PHP, and will try again once that’s been accomplished.


  4. The script worked fine to convert my GL database to WP, and it runs fine. However, the article.php file doesn’t do anything. All I’m getting is my articles that were done under GL opening in GL. There’s no redirect happening.

    But I’m not sure I’ve understood what to do with it. I have my WP files in /wordpress/, and the article.php at the top level of my server. (I assume I shouldn’t be replacing the WP article.php file…) Is this correct?

  5. article.php should be in the same directory with WP. I didn’t know WP had one already. If it does, I’m willing to bet it’s the same one and this is actually included in the distribution now. You could always look at it and see.

  6. Actually, to clarify that, article.php is intended to work as if your wordpress replaced your Geeklog in place, i.e. the root url of your wordpress install is the same as the root url of your geeklog was before you took it down.

  7. I would love to use this script and I went through all the import screens inside WP, but it didn’t actually import anything. It would run correctly and then just report “0 posts imported” or “no categories to import”, things like that. All the way to the end it seemed like the script itself is working great, but it didn’t actually pull anything in from the Geeklog db.

    Any ideas on why this wouldn’t work? I can double check my settings but I’m assuming the script wouldn’t “run” if those were incorrect.

  8. Hi Dave,

    Are you available for hire (pay) to convert a Geeklog blog to WordPress? I have a feeling a lot could go wrong and I am definitely not a database person and don’t know much about it.

    Thanks so much,

  9. @Sculley: unfortunately no. As much as I’d love the idea of making a little money on it, I’m way too busy these days to try to squeeze in anything else and still do a good job of it.

  10. Bummer but I understand and happy you’re busy! Do you think someone who has worked with WP before and knows xtml and css (me) will be able to handle the transfer with your tool?

Leave a Reply

Your email address will not be published. Required fields are marked *