#3241 closed enhancement (wontfix)
Blogger importer doesn't maintain existing permalinks (post slug/name)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.0.4 |
| Component: | Import | Keywords: | |
| Focuses: | Cc: |
Description
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)
Change History (11)
#2
@
19 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
@
19 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).
grabs Blogger permalinks and extracts post names