Support » Plugin: Redirection » [Plugin: Redirection] records imported from blogger

  • The records imported from blogger have the old permalinks stored in the post meta data under a tag called “blogger_permalink”

    e.g. for a post with the title

    “what happens if the blog title is really long? what will be the permalink for this?”

    WordPress is creating:


    But the blogger value is:


    I’ve already implemented a set of simple redirects using this plugin to handle the changes to the categories and to strip of the html


    However there are other subtle differences between the blogger permalinks and wordpress ones. With the meta data already being there there is effectively a list of mappings which could be used by redirection so we don’t actually need to know all these variations.

    I can see a couple of options here.

    1) Use that meta data to create simple redirections in the redirection_items table (perhaps just for the items that don’t exist). I could do this using SQL queries but is there a better way? I’ve got 300 posts to handle but what about the people with really big sites?

    2) Extend the plugin so that’s capable of looking at the the blogger permalink data in the post meta table.

Viewing 1 replies (of 1 total)
  • I’ve created the following SQL to extract the data using PHPMyAdmin

    SELECT CONCAT('/(.*)/',Replace(Right(meta_value,INSTR(Reverse(meta_value),'/')-1),'.html',''),'([^/]+)') AS Source,Concat('/$1/',p.Post_Name) as Dest
    FROM wp_postmeta AS m
    INNER JOIN wp_posts AS p ON m.post_id =
    WHERE meta_key = 'blogger_permalink'
    AND meta_value <> '' and post_status = 'publish'
    and Replace(Right(meta_value,INSTR(Reverse(meta_value),'/')-1),'.html','') <> p.post_name

    The resulting records can be saved as CSV and then imported into the redirection plugin

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Redirection] records imported from blogger’ is closed to new replies.