WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 months ago

Last modified 7 months ago

#3398 closed enhancement (invalid)

import data from Geeklog

Reported by: justdave Owned by:
Milestone: WordPress.org Priority: normal
Severity: normal Version:
Component: Import Keywords:
Focuses: Cc:

Description

I recently converted my blog from geeklog to wordpress, and wound up converting the existing TextPattern importer to be able to pull data directly from a Geeklog database and import it to Wordpress.

The importer is incomplete, but usable, and currently imports categories, users, posts, and comments. 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.

Attachments (2)

article.php (403 bytes) - added by justdave 8 years ago.
geeklog permalink redirects
geeklog.php (18.2 KB) - added by justdave 8 years ago.
geeklog importer

Download all attachments as: .zip

Change History (44)

comment:1 @justdave8 years ago

also worthy of note: I had to add these to my <VirtualHost> block in my apache config to make it work right:

php_value max_execution_time 300
php_value memory_limit 16M

comment:2 @Viper007Bond8 years ago

Just add this to the script:

set_time_limit(300);
ini_set('memory_limit', '16M');

@justdave8 years ago

geeklog permalink redirects

@justdave8 years ago

geeklog importer

comment:3 @justdave8 years ago

The new geeklog.php adds the time and memory limits to the code, and also inserts the story ID from geeklog into a _gl_sid key in the postmeta table. The story ID is then used by article.php to do lookups and redirect to wordpress' permalink when someone accesses the old geeklog-style permalink.

comment:4 @foolswisdom8 years ago

justdave is this tested against WordPress 2.0.x or 2.1 (beta)?

comment:5 @justdave8 years ago

2.0.4 through 2.0.6

comment:6 @justdave8 years ago

"PeterR" posted on my blog (http://www.justdave.net/dave/2007/01/16/geeklog-to-wordpress-converter/) on May 12th:

"worked on geeklog 1.4.x and wordpress 2.1.3 for those interested."

comment:7 @Nazgul8 years ago

  • Milestone set to 2.4 (future)

comment:8 @justdave8 years ago

"Benjamin" posted today:

"For the record, I migrated a Geeklog 1.3.11 install to Wordpress 2.2.2 using your script. This was running on MySQL 4.1.20 and PHP 5.0.4 on a CentOS 4.5 system. Everything just worked!"

comment:9 @matt8 years ago

Let's get this into core.

comment:10 @foolswisdom8 years ago

  • Milestone changed from 2.4 (future) to 2.3 (trunk)

comment:11 @foolswisdom8 years ago

  • Keywords has-patch added

comment:12 @foolswisdom8 years ago

justdave, do you have some sample import files? Could you attach it to the ticket?

(My guess is that these need to be updated to use the taxonomy system)

comment:13 @markjaquith8 years ago

  • Milestone changed from 2.3 to 2.4

A little late to the game. Needs to be updated to use taxonomy.

comment:14 follow-up: @justdave7 years ago

I apparently missed the notification mail when the questions were asked of me back in September... I just happened to poke in here to check on it today. :)

I no longer have any of the old Geeklog stuff around (well, I might in a backup somewhere, I could go digging I suppose), so don't really have a way to test this anymore. It did it's job when I needed it. :)

What do you mean by "sample import files"? Do you mean like a mysqldump of a Geeklog database or something? OK, was just poking around, and I do have backups of the Geeklog setup from December 2006, including a dump of the database.

Was the TextPattern importer updated to use the taxonomy system? This thing was heavily based on that, so whatever was done to that could probably also be done to this to make it work.

comment:15 @darkdragon7 years ago

This can be a plugin and distributed by wordpress extend plugin.

comment:16 in reply to: ↑ 14 @lloydbudd7 years ago

  • Keywords needs-patch needs-sample-data added; has-patch removed
  • Milestone changed from 2.5 to 2.6

Replying to darkdragon:

This can be a plugin and distributed by wordpress extend plugin.

Generally, I think the decision is to ship importers with WordPress to give the easiest experience getting started.

comment:17 @ribbo7 years ago

I've played with this more extensively today (I was the PeterR that reported on justdave's blog).

The import works with both wordpress 2.3.1 and 2.5.1 but the major problem I had was if there was a single quote (') in a post's title (Like Peter's new blog) it would screw up as the import script wasn't escaping them so you end up losing the post title (or part of it).

Also the import script doesn't handle single quotes well in the categories either (it actually leaves the escape chars in so "Peter's travel" became "Peter\'s travel". This one is a whole lot easier to fix though as you could just rename it after import.

I suspect these would be easily fixed by either a function that's used by other imports or copying the equivalent bit over from another import script.

comment:18 @thee177 years ago

  • Component changed from Administration to Import
  • Owner changed from anonymous to thee17
  • Status changed from new to assigned

comment:19 @thee177 years ago

  • Owner thee17 deleted
  • Status changed from assigned to new

comment:20 in reply to: ↑ description @tobiasstrixat7 years ago

hi,

i have programmed some additional features to this importer. it can be found at my blog: http://tobid.wordpress.com/2008/11/16/geeklog-importer/

next to imports categories, users, posts, and comments it now imports links, static pages, and article images. further a list of posts which should be edited manually to remove all geeklog related tags is provided.

best regards,

tobias

comment:21 @pauamma6 years ago

  • Milestone changed from 2.9 to Future Release

comment:22 follow-up: @jacobsantos5 years ago

  • Keywords needs-patch needs-sample-data removed
  • Resolution set to wontfix
  • Status changed from new to closed

Importers are all plugins now.

comment:23 @scribu5 years ago

  • Milestone Future Release deleted

comment:24 in reply to: ↑ 22 @westi5 years ago

  • Keywords needs-patch needs-sample-data added
  • Milestone set to Future Release
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Replying to jacobsantos:

Importers are all plugins now.

That doesn't mean that this is WONTFIX though.

We should have a supported Geeklog Importer in the .org repo and it integrated into the Importers page.

comment:25 @garfiola5 years ago

  • Cc garfiola added
  • Severity changed from normal to critical

this is not working at all, I could only import posts and they are all over the place...

It did not import users, categories, it onlyyy imported comments and posts.

But what can you do without

I am using latest wp 3.0 and geeklog 1.6.1

comment:26 follow-up: @garfiola5 years ago

can somebody fix this?

comment:27 in reply to: ↑ 26 @westi5 years ago

Replying to garfiola:

can somebody fix this?

Does Geeklog have a usable export format or do we still need to do direct database queries?

comment:28 @thee175 years ago

No Geeklog does not export.

comment:29 @garfiola4 years ago

Are the urls of articles same??

comment:30 @garfiola4 years ago

Is it so hard to answer my posts, you just live people hanging here, there is no freaking info detailed one how to do import. You think everybody is an expert in wp

omg, this is not working at all. I think I will just manually import everything. SUch a shame

comment:31 @garfiola4 years ago

I cant even use WP 2.2 because php is version 5, can somebofy updates this page or not?????

I need help please you lazy bastards

comment:32 @scribu4 years ago

Almost everyone here is volunteering their free time, so please be civil.

Last edited 4 years ago by scribu (previous) (diff)

comment:33 @kilerb4 years ago

Hi guys... I desperately want to migrate from Geeklog 1.6.0sr1 to the latest version of Wordpress. 3.03 or whatever is out now. Can someone help with this? Please reply here if you can help. It seems that this importer is for older versions? Any help or direction would be greatly appreciated!

Thanks,
B

comment:34 follow-up: @lingfish4 years ago

  • Cc lingfish added
  • Keywords changed from needs-patch, needs-sample-data to needs-patch needs-sample-data

Hi, I'm too looking to move to WP from GL; had enough of it's terrible handling of custom themes when wanting to upgrade.

I see the status as needs-patch, needs-sample-data -- I'd like to help move this along and get support built right into WP, so how can I help?

comment:35 @SergeyBiryukov4 years ago

  • Milestone changed from Future Release to WordPress.org

comment:36 in reply to: ↑ 34 @dd324 years ago

Replying to lingfish:

I see the status as needs-patch, needs-sample-data -- I'd like to help move this along and get support built right into WP, so how can I help?

Since Geeklog doesn't have any export functionality, Any importer seemingly needs to be written with a decent knowledge of Geeklog, which rules many developers out at the outset. The best line of attack appears to be either

  1. Write a export module for Geeklog which exports to a WXR file
  2. Write a Importer Plugin for WordPress which reads the data directly from the MySQL Database.

Given the geeklog functionalities don't map directly to WordPress either, it makes it a bit more complex, Looking at http://wiki.geeklog.net/index.php/DatabaseSchema there's a few things that can be imported:

  • Users
  • Stories (Posts)
  • Categories
  • Front-page (Sticky)
  • Comments
  • Pages

A few things that don't have a specific mapping:

  • Polls
  • Forum topics
  • Groups (User roles)
  • Events

comment:37 @dd324 years ago

As for the sample data that's required, A Example database and what all the metadata actually means would be useful.

comment:38 @lingfish4 years ago

Ok, noted. I'll start looking into this more, and agree that an export to WXR would be the ideal, rather than WP needing to deep-dive into evil Geeklog.

(BTW, strange -- I didn't get an e-mail notification of this ticket being updated, even though I've CC'd myself?)

comment:39 @dd324 years ago

(BTW, strange -- I didn't get an e-mail notification of this ticket being updated, even though I've CC'd myself?)

Make sure you have an email listed in your Trac profile

comment:40 @chriscct77 months ago

  • Keywords needs-patch needs-sample-data removed
  • Resolution set to invalid
  • Severity changed from critical to normal
  • Status changed from reopened to closed

I don't understand how a proposed feature would ever be a critical level, so adjusting that.

Given the importers are now done in plugins from the repository, this will need to be pushed as a plugin to there. Once that's done maybe core can include a link to it in core like there are for the others.

A new ticket should be opened when this is done

In the meantime, closing as invalid since importers no longer go in core (wontfix didn't make sense because its not in the codebase yet)

comment:41 @smunsch7 months ago

So, chriscct... What should I do for this now? AKA where do I go from here? I'm trying to pull a geeklog site over to WP 4.0.

comment:42 @chriscct77 months ago

@smunsh the ones listed above aren't going to help you, as they haven't been updated in 6 years and would require likely a complete rewrite. I would suggest looking for a plugin or service, but Trac isn't the place for that. Instead use the support forums on WordPress.org. Thanks!

Note: See TracTickets for help on using tickets.