• I finally made the jump to WordPress from Blogger after hearing that the import feature in 2.0 made the whole thing easy. When I ran the import, WordPress sucked in everything just fine. I setup the permalink format to resemble what I had in Blogger and was ready to go.

    To my horror, I found that the WordPress post titles did not match Blogger’s. That effectively whacked every link I’d put in a post linking back to other posts.

    Blogger post title:
    “how-to-botch-blog-transition-in-other.html”

    WordPress title for same post:
    “how-to-botch-a-blog-transition-in-other-words-help/”

    The differences:
    1. Filename truncated in Blogger
    2. Filename ends in “.html” in Blogger
    3. Articles stripped in Blogger title

    I am no master of MySQL database programming, nor am I am not a WordPress guru (having only been using it for a week.) But I have several hundred posts and I’m grief-stricken that I may have to go through and fix by hand every link to another post in one of my posts.

    Is there a better way? If it means starting over, I can do it. But if the importer can’t handle this, what good is it?

    Thanks in advance!

    (P.S. – I did a search on this here and did not find anyone having the exact same problem. Hmm…)

Viewing 8 replies - 1 through 8 (of 8 total)
  • 1. Not sure I can help much, but here is what I think might be a start. First question – does Blogger truncate the post “slug” to the same number of characters every time? If so, is it possible to modify the permalink system to truncate the WordPress slug or at least recognize shorter versions? I don’t know, I’m just thinking out loud. For example, is it possible to write a plugin that could modify the post slug on the fly? I know you don’t know the answer, but maybe someone else will. If that would work then it should be easy to do, I just don’t know enough about how the permalinks work.

    2. You can make your WP permalinks end with .html by adding “.html” to the end of your permalink string.

    3. Not sure what you mean?

    Perhaps a link to your blog would help.

    Thread Starter edelen

    (@edelen)

    Poco,

    #3 – Articles like “the”, “a”, and “an” are not included in the Blogger titles, but exist in the WordPress ones. That’s a HUGE issue since probably two-thirds of my titles include at least one article.

    Note my example and you’ll see what I mean

    Ah, I see.

    Well, here is a start (I’m still learning the ins and outs of WordPress but took this as a challenge) Take a look at wp-includes\classes.php. I don’t know how well this will translate in a reply, but around line 366 you can see the following…


    if (” != $q[‘name’]) {
    $q[‘name’] = sanitize_title($q[‘name’]);
    $where .= ” AND post_name = ‘” . $q[‘name’] . “‘”;

    I think this is where the query parameter is added to help find the post by name. Perhaps this could be modified to debloggerize ™ the name. Unfortunately, I can’t see how. The only thing that comes to mind is to add an extra column in the DB (through some sort of automatic plugin) to each post with the bloggerized name and search that instead of post_name.

    Anyone have any ideas?

    It might be considered sloppy, but could mod_rewrite do the trick by removing the “a-” “an-” or “the-” articles from all page requests? (I guess if it’s used, it should probably just be considered a stop-gap measure.)

    Not that I could write the code, mind you…

    The problem with that, which is similar to the problem with my suggestion, is that the URL does NOT have the articles. So you would need a mod_rewrite change that could add the articles ??

    You could just manually edit the slug for each imported post (duh, why didn’t I think of that sooner?). Not much fun, but easier than fixing all the links. If you go to the edit page for a post, on the right side there is an item called “Post slug”. If you make that the same as what Blogger uses then all your links will be fixed.

    I suppose someone could write a plugin to do that. Maybe I will add it to my list. For now you can take a look the other plugins I’ve written to help with Blogger imports.

    https://notions.okuda.ca/wordpress-plugins/

    Oh, duh! ::slaps forehead::

    Definitely sounds like something to add to the Blogger import tool — it’s not like broken links are a minor issue. ??

    I forgot I had this happen to me when I switched. I only had three or four broken posts because of it, so it wasn’t a big problem for me.

    mbquilts

    (@mbquilts)

    If anyone is considering modifying the blogger import tool(s), it would be nice to allow an option to NOT import titles. My Blogger blog pre-dated titles, and I didn’t start using them once they were available. My imported titles are long strings of numbers.

    I would just as soon not had anything or an option for a short line or other filler than to have to figure out the mySQL to get rid of all the non-titles. Correcting over 1200 posts manually isn’t really an option.

    Poco

    (@poco)

    I have written a plugin to convert those non-title titles into Blogger type titles (uses the first few words or characters of your post as your title like Blogger does).

    https://notions.okuda.ca/wordpress-plugins/blogger-title-fix/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Converting Blogger Titles to WordPress?’ is closed to new replies.