Make WordPress Core

Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#3241 closed enhancement (wontfix)

Blogger importer doesn't maintain existing permalinks (post slug/name)

Reported by: justinsomnia Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.4
Component: Import Keywords:
Focuses: Cc:


The current Blogger importer script doesn't grab the existing permalink URL, so post_names (aka slugs) are generated by WordPress based on the title, which can sometimes differ significantly from those created by Blogger. For instance Blogger limits post names to less than 40 chars (without breaking words), it strips non-ASCII characters, and it removes article words (a, an, the).

I've written up more information about the problem along with the fix here:
Maintain permalinks moving from Blogger to WordPress

People moving from a self-hosted Blogger blog to WordPress are usually keenly aware of wanting to maintain the links to their posts (usually for PageRank purposes). Unfortunately the current script makes this impossible without manually comparing and updating the post name for every post!

Luckily it turns out that importing the Blogger post name is insanely easy (unless there's some scenario I'm not thinking about). In any event, I'm attaching a patch that I've tested successfully on a Blogger blog with 400+ posts.

Attachments (1)

blogger.php.diff (2.8 KB) - added by justinsomnia 15 years ago.
grabs Blogger permalinks and extracts post names

Download all attachments as: .zip

Change History (11)

15 years ago

grabs Blogger permalinks and extracts post names

#1 @Nazgul
14 years ago

  • Keywords has-patch added
  • Milestone set to 2.3 (trunk)

#2 @westi
14 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.3 to 2.4 (next)
  • Owner changed from anonymous to andy

Current patch doesn't apply.

Blogger importer is very different now.

From a quick look at the code it still doesn't pass down the blogger permalinks but it does store them in post meta:

add_post_meta( $post_id, 'blogger_permalink', $entry->old_permalink, true );

Switching to needs-patch and sending off to the future.

Assiging to andy as I believe this importer is his baby.

#3 @Otto42
14 years ago

Suggestion: Get the blogger slug from their permalinks, and put it in the "_wp_old_slug" meta variable. Then you can keep your new slugs (which are not nearly as hideously ugly as Blogger's slugs are) and still have the old slugs work too (with the old slug redirection code).

#4 @ffemtcj
13 years ago

  • Milestone changed from 2.5 to 2.6

#5 @thee17
12 years ago

  • Component changed from Administration to Import

12 years ago

  • Keywords reporter-feedback added
  • Resolution set to wontfix
  • Status changed from new to closed

Is this still valid? This is two years old with no real activity in more than a year. Closing. Re-open with more info.

#7 @mrmist
12 years ago

  • Keywords needs-patch reporter-feedback removed
  • Milestone 2.9 deleted

#8 @mrmist
12 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

#9 @mrmist
12 years ago

  • Owner andy deleted
  • Status changed from reopened to new

#10 @mrmist
12 years ago

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.