Maintain permalinks importing from Blogger into WordPress

WordPress logoThe WordPress importer for Blogger doesn’t use the already published post “slug”—which is necessary for maintaining the permalinks (aka the URLs) of imported posts. Instead the importer generates brand new permalinks based on the post titles, using rules that diverge notably from those used by Blogger:

So for example, a post title like:

Los viernes, música para tu iPod en iPod Noticias

gets transformed by Blogger into:

los-viernes-msica-para-tu-ipod-en-ipod

whereas WordPress produces:

los-viernes-musica-para-tu-ipod-en-ipod-noticias

How a title gets transformed into a permalink (aka “dirified”) is of little importance here. What is crucially important is that the permalink doesn’t change—an issue when moving from one blogging platform to another. The average blogger probably doesn’t care about this too much—but there are some people (myself included) who wouldn’t want all the existing links to our blog posts out there on the internet to break, especially when it comes to maintaining that precious PageRank™ (and findability).

When I moved from Blogger to WordPress 1.5 in 2005, I managed to maintain the permalinks the hard way (just shy of updating every one by hand). These days, the importer is so good, practically all you have to do is click a link and sit back. I wanted the same to be true for the permalinks.

Update: A number of people have sent me emails or left comments about troubles they’ve had with the Blogger Importer. Oftentimes it only seems to import a fraction of their blog posts and comments. In which case, they revert to Plan B: download an Atom-based export of their Blogger posts and comments, transform it into a WXR file (aka WordPress eXtended RSS), and then import it into WordPress using the WordPress importer. This solves the import problem, but tragically it leaves behind the crucial metadata necessary to update the WordPress permalinks to their Blogger equivalents. However, all is not lost. Since version 2.0, my plugin will now generate best-effort, Blogger-like permalinks if it can’t find the crucial Blogger permalink metadata.

Instructions

  1. First, import your posts using the Blogger Importer or via a WXR file.
  2. Download and unzip wp-maintain-blogger-permalinks-2.1.zip (v2.1)
  3. Upload the file maintain-blogger-permalinks.php to your plugins directory:

    /path/to/wordpress/wp-content/plugins

  4. Activate the plugin (don’t forget!)
  5. Under Tools > Maintain Blogger Permalinks click the button that says “Maintain Blogger Permalinks”. And that’s all. This is a one-time-use-only plugin. All your permalinks have been reverted to their Blogger versions.
  6. Deactivate and delete maintain-blogger-permalinks.php
  7. If you haven’t already, go to Settings > Permalinks and select “Month and name”
  8. Finally, install the Blogger 301 Redirect plugin and follow its instructions to redirect your old Blogger posts to their new WordPress locations.
  9. For other Blogger-specific import issues, check out DB Nguyen’s excellent guide: Moving from Blogger to WordPress Without Losing Page Rank or Followers.

Questions, comments, and suggestions are always welcome. If you’re interested in contributing to the code behind Maintain Blogger Permalinks, it’s hosted on GitHub.

Feel free to if you found this useful.

209 Comments

Well, am I really the first one to comment, or is this just the weird design?

Anyway, tried everything perfectly, and all I am getting is errors about unexpected [ in pragma. any help?

BTW, I guess this will help me to maintain links to my own posts, right? I mean, if I had a link to http://yuvipanda.blogspot.com/somepermalink, and I import it to wp, I get it as http://blog.yuvisense.net/samepost, right?

Any help? While I am no no-programmin-allowed guy, I am certainly a noob in PHP, so, please help:D

Yuvi, yep, you’re the first. This method is really not intended for blogspot-hosted blogs because blogspot offers no way to automatically redirect a request for an old post to a new location. So the benefit of maintaining a permalink in that case is only superficial. However, if you still want to do that, this method should work for you.

I would need more information about the error you’re getting (when it happens, the exact text, etc) to determine what might be the cause.

Thank you! Question: I have a blogger blog that has three flavors of permalink URLs – some have “.html”, some have “.php” and some have no extension. How might I modify the included script so that I can migrate to WordPress and still maintain all the permalinks? (could I import them all with no extension then use the “resolve” trick–step 7–to work for both .html and .php urls?)

Scott, in the rewrite rules in your .htaccess file, replace the long last line in the example at the bottom of this post with:

RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)(\.html|\.php)?$ $1/$2/$3/ [QSA,R=301,L]

That should match anything that ends with .html, .php or nothing.

Hi Justin,

Thank you for these suggestions, i’m really interested on keeping the same permalinks but i’m getting this error:

Warning: Unknown modifier ‘]’ in blogger.php on line 412

for each post trying to import. Same error on WP 2.0.4 and 2.0.5, any help?

Fernando, oh shoot! You found a bug.

Unfortunately it’s because WordPress has a bug that causes it to remove backslash characters (\) inside <pre> blocks. I usually get around this by escaping the blackslash with &#92;, but it appears that I missed one in the regular expression on line 412.

If you change your updated line 412 to

preg_match("/([^\/]+)\.html$/", $postinfo[6], $matches);

… that should fix it.

Thank you for the very helpful comment, as this appears to be what was impeding Yuvi.

Justin,

I don’t know regular expressions but i found something that seemed to work too.

I changed line 412 for this and it worked:

preg_match(“/([_A-Za-z0-9-]+)\.html$/”, $postinfo[6], $matches);

Of course your solution looks better ;-)

I’m going to import it again to be sure, thank you for Suicide! ;-)

thank you for Suicide!

May not be legal in some states :)

scottlunt

Justin, I was all ready to run the importer with the new changes and my blogger account was moved to the new beta blogger site! Now, the login doesn’t work for the blogger import feature. Any ideas on who to ping to get the blogger import script updated to include the new blogger?

Scott, it looks like you might be up a creek…

Here’s the WordPress ticket tracking that issue: Blogger Import failing with Blogger Beta (#3063)

[…] Siguiendo las indicaciones que amablemente nos ofrecen desde Justinsomnia.org (aquí y aquí) procedemos a modificar el fichero blogger.php que se encuentra en el directorio wp-admin/import/ de tu instalación de WordPress. […]

scottlunt

Thanks Justin, luckily I have an early import of the site to WP that I did before the Beta Blogger fiasco. The problem is that I imported them before using this script and so many of the links are incorrect (as you’ve described, without the “the” and so on). Is there a good way to retroactively apply your script to the WP posts to correct the naming convention?

I have as an RSS feed of the posts which I can import into WP. I could do a search and replace within a text editor to change the “post_name” tag to fit the blogger naming convention (the post_name currently is in WP style). The blog is 1600 posts long so I can’t really change each title by hand.

Any suggestions are greatly appreciated!

scott, you might want to send me an email to see what we can do. There are a number of strategies I can see taking. I haven’t played with blogger beta yet, but I’m assuming you can set the archive template so that you can output the permalink url and the title for every post by month in a format that can be readily imported into php (as an array). Then we could write a little code to lookup the post in WordPress by title and update its post-slug (the permalink identifier) to what Blogger used.

I have to enter /sitename/index.php/year/month/postname in the address in order to reach the individual post page. Any ideas what I did wrong?

[…] Oh, btw, the Blogger import thingy in WordPress works pretty good – together with these hints/and modifications here and some additional .htaccess tweaks and copying of static files, the transition was pretty fast and smooth. […]

If the importer fails with “Error on form submission. Retry or reset the importer.” then read this: http://wordpress.org/support/topic/82001

The redirect in my .htaccess file seems to have no effect, links are not being re-directed. Suggestions on where to start troubleshooting?

Ok, i’m havin some problems importing my beta blogspot blog into a wordpress one. I used This Script in PHP to export the blog, but as you can see my blog is in Spanish, so i use a lot the ñ and the accents and some of my post have very long tittles, so i’m having the problems you mention in the entry. I think i’ll wait for an official importer from wordpress or someone to release a solution

mjeppson, did you add the .html fixing rewrite rule as its own block, separate from the WordPress rewrite rules—this is important. You might want to try specifying the full URL in the rewrite, e.g.

http://www.freshdv.com/$1/$2/$3/

sinisterff, you’re better off asking the creator of that specialized script to add the ability to maintain blogger’s permalink slugs.

[…] Note: Si vous hébergez vous-même votre blog Blogger, visitez Maintain permalinks moving from Blogger to WordPress by Justin Watt (EN). […]

I need some help with my WP permalinks. I don’t know the first thing about .htaccess and the code behind all of this permalink-stuff. So any help would be apprecaited.

I’m currently using the default WP permalink structure.
I’d like to change the structure to: /%category%/%postname%/

When I change the structure in the permalinks admin panel and I test the pages, I get what appears to be the main page of my site. (for example, the comment now box doesn’t appear, and there are other posts on the page).

Any ideas what might be causing this?

ben, hmm. You should not have to mess with the .htaccess file or anything in order to change your permalink structure. Have you tried changing it in a different way to see if that works, e.g. “Date and name based”?

/%year%/%monthnum%/%day%/%postname%/

Reading the Using Permalinks documentation, I see that:

%category% does not work correctly with some implementations of mod_rewrite in Apache versions prior to 2. If you are using Apache 1 and experience problems using %category%, either do not use %category% in your permalink structure, or refer to Schlueterica’s plugin.

Thanks for responding. I changed the permalink structure to the one you suggested:

/%year%/%monthnum%/%day%/%postname%/

but the problem remains. Take a look at GarnishBar.com and click on a post to see the result.

ben how strange. I see that WordPress is rewriting all the permalinks to the new structure, and it appears that mod_rewrite on your webserver is correctly forwarding the generated permalinks on to WordPress to determine what to serve (otherwise you’d be seeing 404 errors), but for some reason, WordPress is just returning the homepage.

In your root web directory (the one you move the index.php file into) does your .htaccess file look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

In the very least, it looks like you’re not alone: 2.0.6 Problem with Permalinks. Perhaps try upgrading to 2.0.7?

Yup looks just like that:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Sorry ben, I’m not sure what’s going on. Could be some weird interaction between mod_rewrite and WordPress. I’d add your 2 cents to the 2.0.6 Problem with Permalinks support thread.

[…] PageRank de Google. Esto lo logré revisando algunos blogs que tuvieron el mismo problema: Maintain permalinks moving from Blogger to WordPress y Moving from Blogger to WordPress: Best […]

Thanks. I was stuck with an .htaccess issue moving Whizgiggle permalinks, already-indexed as YYYY/MM/DD/post-title, to simply /post-title. Turns out I was mixing my rules with WP rules. Worked as soon as I moved my block up above the WP block. It’s important to think about what I’m doing I suppose. :)

I think I’ll poke around your site a bit. Looks nice. This layout is pretty snazzy. -bill

What about WordPress 2.2? It seems that the blogger.php file is totally new. Any help ?

Hi I’m trying to import from blogger using the inbuilt blogger import tool in 2.2. (I was mightily impressed that you helped adapt it to ensure permalinks were being kept). However the permalinks are not being accurately imported. blogger.php is now markedly different to the one you refer to on this page, and I can’t make the changes you suggest.

As an example,

http://dermod.blogspot.com/2007/07/importing-podcast-into-wordpress-from_01.html

changes to

example.com/2007/07/importing-a-podcast-into-wordpress-from-blogger-part-two.html

In many cases, unless the permalinks are short, the wordpress created permalinks are longer.

Any idea what to do? I’ve posted this question on the support forums here.

Thanks for your time

Dermod

I have made a patch to the blogger import code from WordPress 2.2.1 that will maintain the blogger styled URI on your new WP site. Have a look at http://my.opera.com/djp/blog/2007/07/02/maintain-permalinks-moving-from-new-blogger-to-wordpress-2-0 and let me know how you get on.

Superb, David, well done, works a treat!

Just a quick question to follow up – I need to write in the .htaccess file a rewrite rule that changes requests for the old blogger archive and labels files to either the relevant archive and category pages in wordpress, or at least the index page. Google tends to use archive pages in old results.

So if someone is looking for the May 2006 archive, the structure in blogger is:

http://bonhom.ie/archive/2006_05_01_archive.html

In wordpress, the structure will be:

http://bonhom.ie/2006/05

Similarly, with categories/labels, the blogger structure is, for example with music:

http://bonhom.ie/labels/music.html

The wordpress structure will be:

http://bonhom.ie/category/music

I attempted tinkering with the .htaccess file myself but I don’t know what I’m doing and it crashed wordpress.

Any help would be greatly appreciated!

Sorted it out myself. Answer is:

RewriteRule ^labels/([^/]+).html$ category/$1/ [QSA,R,L]
RewriteRule ^archive/([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [QSA,R,L]

khris

hi justin!

i am with js-kit and we have some cool widgets for blogs. i am writing to see if you would be interested in working with us to create plug-ins for wordpress for our widgets.

you can reach me at khris at js-kit.com

http://www.js-kit.com

I just wanted to say thanks for Instruction #6 on how to change your permalinks to have the html at the end and WordPress Suicide. I tried it tonight, was able to delete my blog and reimport. Thanks so much!

I’ve significantly updated this post for WordPress 2.3 (from WordPress 2.0.4) including a new single button push utility plugin that will update all your imported Blogger posts to use their old Blogger post slugs.

Once you run the plugin you can deactivate it and delete it. It does not need to stay installed to work.

Superb plugin Justin, I’ve just applied this to our blog and the URL’s are now exactly how I wanted them (the same as blogger).

I’m actually having a problem with the RSS feed using FeedBurner at the moment though, getting a 404 error when trying to burn the feed, they seem to think this is caused by the new permalinks. Would be great if you have any ideas about how to fix this.

Thanks,
Kevin

Kevin, yeah, if you had Feedburner set up before updating your permalinks to the old Blogger slugs, FB may publish old permalinks for a while. However looking at your feed, all the entires now appear to resolve correctly.

Howdy, a couple things to make your article more visitor friendly…. well, more friendly to non-techie types. Its fair to assume many come here already wanting this specific information but some of us come just to even begin understanding how to make the switchover from Blogger to WP, so explaining the major benefit(s) of employing this action would be super valuable.

In other words, I see that it is possible but what is the downside if I don’t keep the slugs the same? What is the upside if I do?

My main concern is to create a fluid movement from people coming in from an old link and being able to get to the right area on the new site.

Is that possible?

Thanks,
Sam
ps. maybe put (updated for wp2.3) at the very, very top. Again, thanks.

is there an update for this for the new WP 2.3.2?

I believe this should work with 2.3.2… Please let me know if that’s not the case.

Justin, the plugin works fine whit wp 2.3.2 version, my blog export ok from blogger, thank you! I made a little donation to your plugin

Thanks Thanks Thanks, It’s so help full i would be lost with out this post actually i’m moving my blog from blooger to wordpress, by the way i dont want to loose my permalink and search results . i have been trying lots of method for past 2 weeeks, yours worked

I am so obliged to you , thanks thanks so much

Hi, this is my wordpress structure :
/index.php/%year%/%monthnum%/%day%/%postname%/
When i try the instructions, i obtain an Error 500 on the server, and i must delete the .htaccess file !
When i try to change my wordpress structure, Error 500 too ! Can you help me please?

Hi Robert, it sounds like your webhost may not be set up to allow .htaccess files? I would try to contact their support staff who probably have experience with configuring WP.

But looking at antivoitures.free.fr (if that’s the blog in question) suggests that the permalinks are ok.

Thanks for creating this script! This saved me tons of time I’m sure. :)

Hi! i only want to say thank you for your usefull plugin!
Really i searched over internet for long time to solve blogger to wp redirection problem, without success…..now sems work all fine!
thank you again
G. (WP 2.3.3)

THANK YOU THANK YOU! This plugin saved my sanity! It worked!

One little question– can I delete the old Blogger blog? Will this affect the redirects?

just to clarify, this is only keeping the post title/slug and not the actual URL set up?

Well, Cole, it depends. In the early days of Blogger, before Blogspot, people used it to publish to their own webspace. So if you still own the domain at that webspace, and you want to move from an ftp-hosted Blogger blog to a WordPress-powered blog, then yes, this would help you to maintain the very same permalinks.

If however you’ve been using Blogger with a blogspot.com subdomain, then this will only keep the post slug the same, which doesn’t really buy you much.

Thanks, Justin. I was just confused because in the example you use year/month/name but my Blogger (via FTP) has a set up of year_month_date_archive.html#postslug I am looking for a way to avoid broken links and easily redirect visitors to the new location – would this do the trick then?

Cole, technically, this:
year_month_date_archive.html#postslug
is not a “true” permalink, it day archive with a link target. I’m sure there’s a way to maintain those style “links” but it’d probably take a lot of effort and some javascript hacking, etc etc.

hi
really thanks for your plugin :D

is there anu solution for chinese blog? because when i use /%year%/%monthnum%/%postname%/ this custom setting,
my postname(which is title),will become a lengthy numerics

Xiawa, do you have an example of a Blogger permalink before and a “numeric” WordPress permalink after?

I know WP coverts Unicode characters it doesn’t understand to URL entities like Wikipedia does, but I’m not sure how Blogger treats non-ascii/latin Unicode characters in permalinks.

Thanks very much for the plugin! It’s exactly what I was looking for.

Dan

Do I follow these steps before or after importing my blogger blog?

Dan

Also (sorry for the double post), this also works for blogspot hosted blogs which have their own domain?

Dan, I didn’t realize blogspot blogs could have their own domain, but if so, then yes, this should work. And you should run this after you import into WordPress. If you run into problems, feel free to leave a comment.

thanks a lot for this great tip! i have finally moved my blogger account into wordpress platform including SEO points hopefully, it worked perfectly from my vertito.blogspot.com blogger account

nice ! keep it up!

Does it still work with WordPress 2.6 ?

After reading dozens of websites which didn’t give me what I needed, I found your “suicide” script and your permlink instructions. I need to add that I had to export my posts table and perform “edit…replace” to remove all traces of myblog.blogspot.com over to the new domain root. Now, all my links and references to posts are working properly. Great job. Thank you so much. I owe you big time!

Hi,
I was psyched when I found this plugin but then I realized that it may not be applicable to me. I have been publishing on blogger and not my own domain (hence my URL contains blogspot)… My plan is to transfer to wordpress and publish to my own domain. But I think your tool wouldn’t help me since it seems to apply only to the part of the permalink following the domain name… right?

Is the only way to keep my links available to readers by leaving my blogspot blog up?

I think I’m making sense. Please let me know.

Thanks,
Stacy

Can I use this tool if i want to use wordpress permalinks like http://www.example.com/%postname%/

Can i use this, will this protect blogger links ??

I too am publishing on Blog*Spot, and am wondering how to perform the move. My circumstances are pretty much identical to Stacy’s above.

Hi there, seems I found a place where maybe I cant get a bit orientated. I am having a problem, I have WordPress 2.7 and the only way my blog permalink structure works is with the index.php part (which I didnt have on Blogger). Ex. /index.php/%year%/%monthnum%/%postname%.html

How do I avoid using index.php? I am unable to access .htaccess file because my hosting provider doesnt supports it.

Any ideas?

Thanks for your help!

Fernando, it might be a requirement of your webhost to leave the index.php in the permalinks. I would check with them. There’s lots of helpful information on Using Permalinks.

Dave

Does this still apply for migrating to WordPress 2.7?

Mary

Justin, when I tried to install the plugin, I got the following message:

“Incompatible archive: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature.”

Any advice?

Thanks.

Dave, I dunno, haven’t tried. Let me know if it works for you.

Mary, sounds like something is wrong with WordPress’s ability to unzip a zip file. I don’t know why that would be a problem here.

Todd

I can’t get this the plugin to work for wordpress 2.7

Paul

This worked fine on WP 2.7 for me. Note that the Maintain Blogger Permalinks link is under Tools in 2.7. Thanks!

teri

Hi Justin: maybe you can help, I imported 248 posts into the wordpress self hosted site i have from the former blogger site (http://PoliticolNews.blogspot.com site and everything went okay. I closed down the old blogger site, now the links to the old posts are going nowhere. New site is: politicolnews.com

How can I change the links on the current site, which I have set to % postname% – so that all those old blogger posts -point to my new site’s posts where they are located now?

Don’t want to have to rewrite all 248 articles for the links I have lost. Any ideas? hosted with hostgator, I am not techie so have to get someone to do changes in cpanel. thanks. Teri

teri, i don’t believe there’s anyway to have blogspot.com redirect to your new location on wordpress.

hey there! So I’m using this, but am super sad it’s not working for 2.7. I just realized a ton of my incoming links aren’t getting converted.

Can I nudge you to try to update it to work for us? Pretty pleeease? :) :)

here’s an example of what’s NOT working, if this helps:

original link: http://willotoons.com/blog/2004/11/whole-new-look-on-life-my-lasik-story.php

new location: http://willotoons.com/blog/2004/11/a-whole-new-look-on-life-my-lasik-story/

seems blogger not using “a” in their permalink title is what’s throwing it off?

halp!

willo, i’m not sure if anything has changed as far as the wordpress blogger importer in 2.7, but in previous versions, they saved the original blogger permalink in a custom field called “blogger_permalink”. check one of your imported posts and see if you have this in the custom fields. if you do, then the plugin, should work. if not, you might be out of luck…

Hi! Awesome plugin:) I’m getting this problem with SOME (most of the post came out great) posts: mistmatching month!

Example:
/2009/02/ciudadania-espanola.html WP
/2009/01/ciudadania-espanola.html BLOGGER

What do you think it coul be the solution? I’m guessin ti has somehting to do with those post that are saved as drafts and then published.

Juan, that’s truly odd. I’m not sure how WP could have gotten the date so wrong—perhaps it has something to do with timezones and misinterpreting GMT?

Juan D.

it works for 2.8.2? :)

I’ve read everything twice but I’m still confused about exactly what this plugin will achieve for my new WordPress blog. I just moved over from Blogger and I would like all the links that currently click through to posts back at my old Blogger site to become navigational within the new WordPress site (so I can close down the old site). Is this possible? And is that what your plugin is for? Thank you!

Milli, shoot me an email and I’d be happy to explain.

Moving my blog. was really looking forward to using your plugin. It was the first one I installed!! It is a brand new wp site. must be a recent version. And it’s not working. If my wp is too new, can you teach us how to tweak it. Please.

Kelly, I just added a section to this post above the instructions that tell you what to do if your current Blogger blog is hosted using blogspot.com (i.e. if it has has blogspot.com in the URL). Let me know if this helps. Otherwise, shoot me an email.

Justin, thanks for the reply, but we cant make that code work to maintain permalinks. We have tried various options of changing it too and nothing works. Also sorry to comment again, but “shoot me an email” takes me to an about page w/no email link.

It seems like you know this stuff well; do you have any other ideas? I have looked high and low…
btw, we never found a button anywhere in wp which says “maintain permalinks” when we activated the plugin. We just clicked “activate.”
Thanks.

Kelly, my email address is listed on my about page under “contact”…

ralph

this is an excellent solution and thanks for the redirect code.

Thanks for all the help Justin!
It’s working great!!
You have the method that works! We’ll tweet your blog today too.

Hi thanks for this wonderful article. But i want to share something here. You have told that after september 2009 there is no way for 301 perma redirect. I hope this statement is wrong. I moved to wordpress in the middle of september with complete 301 perma redirection and its working perfectly well. You may contact me if you want to know more about it.

You! Have! Saved! My! Life!!!

Thank you so much for this plugin and excellent instructions. It works perfectly for me. I had a Classic Blogger blog that I hosted myself and published via FTP. I had over 500 posts and could not figure out how to redirect the old URLs (to which there are many, many links on other web sites) to the new URLs. I thought I was going to have to create individual 301 Redirects for every single page, which I could do because I wasn’t hosted on BlogSpot. Thank god I found this article before I tried that. AND thank god I only wrote 3 new posts in WordPress so far and had to change some of the internal links in those posts to the new “old” Blogger format created after installing your Plugin.

Your instructions were very clear and easy to follow. Since you are so good at this stuff, are there any other Plugins you recommend as essential for WordPress newbies?

Beth, that’s wonderful. I’m glad you found this useful. it sounds like you are one of the rare people to have been in my spot when I switched from Blogger to WP. Most people nowadays just use blogspot.com, which makes true redirects well-nigh impossible.

As far as other plugins to recommend, most of the ones I’ve written are utilities like this one. One you might enjoy since you include a lot of pictures in your posts is the Random Image Plugin for WordPress. It display a random picture on every page load that links back to the post it came from. Configurable, but super simple out of the box. Visual serendipity I call it.

Hey Justin I’m trying to move my blog from blogspot.com over to wordpress and I have a silly question for you… how do I edit the .htaccess file?

I’d like to pop in the code you provided to change the .html files but I’m stuck! I have no idea how to do this.

Thanks for your help!

Ginger, basically the “.htaccess” file is created by WordPress (if it has access to do so) in order to tell Apache (the webserver) make your permalinks “pretty”, e.g.
http://example.com/2009/10/my-blog-post/
instead of
http://example.com/?p=123

You may be able to edit it under Appearance > Editor in WordPress directly, otherwise you may have to use FTP or your webhost’s control panel. Here’s some more documentation: Creating and editing (.htaccess).

Hi !

Thank you very much for all the information. I think I did everything right but I am not sure it is working because my old blog http://www.blog.nameofmyblog.org is not redirecting on my new one… Do you know why ? Do I have to do the stuff with Javascript?
There is nothing to do on Blogger?

Hi Justin,
Thanks for the great post. I am self-hosted but using blogger and I need an upgrade. I have downloaded wordpress and plan to make the change this week.
One question… if I set up wordpress in a directory that is blog/fabricwrappermusings.html so that it is in the same place it is now, for the period that I upload wordpress and move and fix my blogger postings will anyone on my site see all of this confusion live? I assume there is no way to avoid it other than to rename the blog…
Thanks for your advice!!!

Steph, my recommendation would be to set up WordPress in another directory like “wordpress” at first in order to do all your testing and importing. Things may go wrong, you may need to start over, etc, so it’s just easier if your testing happens in a separate directory from your current live blog. Then when everything is working in http://www.fabricwrapper.com/wordpress/ Do the following, in this order:

1) Update the WordPress’ expected URL in the WordPress Admin under Settings > General from http://www.fabricwrapper.com/wordpress to http://www.fabricwrapper.com/blog (at this point WordPress will be temporarily broken)
2) Move your old Blogger “blog” directory to another directory, like “old-blog”
3) Move your new WordPress blog from “wordpress” to “blog”

Then eventually I’d recommend creating a redirect so that old requests to “http://www.fabricwrapper.com/blog/fabricwrappermusings.html” get redirected to “http://www.fabricwrapper.com/blog/”

Voila, you should be all set. Let me know how it goes.

OK, the first part worked great… I moved the blogger blog from self-hosted to blogspot, opened a wordpress.com account, moved the blog there, then downloaded wordpress.org and moved the blog there. So here it is (obviously needs work!): http://www.fabricwrapper.com/Blog/wordpress/
Thank you for getting me this far!
My next issue is that I want the URL to be http://www.fabricwrapper.com/Blog/fabricwrappermusings (not wordpress!) I screwed up when I named the file folder I put this in, not realizing that would end up being my new address. Is there any way to change this without doing it all again? Can I request a redirect with my host?
Thanks again, Justin!!!!!

Steph, if I might make two recommendations: don’t include capital letters in URLs (e.g /Blog/) and simplify your URL structure so that the homepage of your blog is just:

http://www.fabricwrapper.com/musings/

That makes for a much cleaner, readable URL, not to mention shorter, which is better for including in emails and having to type out by hand.

As far as how to do that, it basically requires doing what I recommended in my previous comment. Update WordPress’ expected URL in settings to the URL above, and then move WordPress into a directory called “musings”. If you need more help, feel free to send me an email.

Patty

Hi Justin: Everything so far working fine. In fact, when I activated the plugin, my theme finally displayed. (I think it was because there was no .htaccess file in the WP folder yet). But when I put the code in the .htaccess file – making the RewriteBase line match the one in the # BEGIN WordPress block, I get a browser Redirect Loop. (I get a server error if I leave it like yours … my blog IS in a folder called “blog.”)
Any ideas? Thanks a bunch!

Logesh Kumar

Gr8 post …. It worked for me .. thanx a lot justin.
i wnt to make sure one thing.is this a safe way (i mean,regarding maintaining pagerank and google juice)?

Patty, that seems strange, it sounds like something else might be going on. Perhaps you have multiple .htaccess files interacting. What was your “RewriteBase”?

Logesh, there’s nothing about this post that is specific to page rank. It simply is a way to provide continuity between Blogger and WordPress. It just so happens that that helps Google maintain pagerank, but that’s really just a side-effect.

Just wanted to say that this plugin/method has worked perfectly for me several times. Thanks for such an easy fix!

Shannon, so glad you found this useful—it amazes me that it continues to work after more than three years. Thanks again for the kind donation.

lola

everytime i click your #2. my computer downloads it as a php file for adobe go live. it doesnt download as a zip…

what should i do?

Lola, try using a different browser. The .zip file downloads fine for me in Firefox.

lola

ok i got it to upload… but i have a question. let me give you the background first:

i am going from blogger to wordpress selfhosted
1. i first bought the domain name and converted my “somename.blogspot.com” to “somename.com”– that made all my posts have somename.com/nameofpostings.html instead f the somename.blogspot.come/name of posting.

2. i am using a temporary website provided by bluehost/wordpress.

2. within wordpress i converted my permalink structure to a custom structure using this code: /%year%/%monthnum%/%postname%.html

alot of websites ive read said using this method will minimize the breaks in links once i make the “big change over”.

3. i then imported all the links.

now this is where i need your help or advice.

i want to know if i can download your plugin, so that i can ensure my links are converting correctly, while also keeping the, /%year%/%monthnum%/%postname%.html custom permalink structure.

if i download your plugin will everything still work properly?

i was going to also download and use this redirection tool: http://urbangiraffe.com/plugins/redirection/. which is recommended by many people

basically, i want to cover all bases.

what do you think?

thanks so much in advance!

lola

ooo, there’s alot of typos in their including my numbering… sorry about that justin. let me know if something isn’t clear…

and i meant: “all my posts have somename.com/nameofpostings.html instead of the somename.blogspot.come/nameofposting.html”

Lola, as you can see from the other 105 comments on this post, this technique has worked quite well for a number of people. But yes, you can use it with a custom permalink structure of /%year%/%monthnum%/%postname%.html which means you can ignore the bits of my instructions about setting up custom .htaccess rules (skip step 8).

Keep in mind that my plugin is one time use only. You just run it once, and it will update your imported Blogger posts in WordPress to have the same permalink base as they had in Blogger. If it works, you can uninstall the plugin and go about your business.

Just, Thank you for this information; I had originally setup a client to work with a system that creates new posts with .html matching the Blogger structure and quickly found the error of that way; WP-Print won’t work with pages ending in .html and many of my clients are food bloggers so a print function is a must.

But I do have a question. I’ve just transferred a client from blogger to WP. Most worked fine as she had changed to using a ‘custom’ domain a while back. It appears now though that she still has some Google links with her old blogspot address and for the life of me I can not get those to redirect. The problem I’m having with your script is in Blogger; it wants to change the the code syntax; changing the apostrophes around the domain names in the code to html text; which results in an error message and will Blogger will not save.

Any thoughts?

Thanks!

Barbara, if your client still has old blogspot URLs out on the web (in addition to in Google) the only way to ensure that they redirect is using Javascript in the Blogger blog. In fact I would even go so far as to remove the content on the blogspot pages and replace it with a “This page has moved to http://…” link, in addition to the Javascript redirect. Eventually Google will realize the content has moved and will update their index. It’s not as nice a solution as a simple 301 redirect (if she had been self-hosting Blogger), but it’s better than nothing. If you have any other questions, feel free to send me an email.

lola

i didnt read the other 105 comments, but the ones i were able to scan didnt seem to have the exact question and answer.

so are you saying that after i upload it once into my wordpress blog, then i dont ever need to upload again? even if i import more postings?

Lola, usually most people only transfer their posts from Blogger to WordPress one time, so your question, “even if i import more postings?” doesn’t make sense to me.

What this plugin does is change the permalinks of your WordPress posts to match the permalinks created by Blogger. Once you activate it and run it, you can deactivate it and delete it. Along with the custom permalink structure you already mentioned, your WordPress permalinks should match your old Blogger permalinks exactly. I hope that makes more sense.

Hey Justin,

Thanks for the time you take to help with migration.

I have a bunch of FTP Blogger Domains. So I converted a minor one to BlogSpot, and then imported to my WordPress Custom Domain. All of the URLs now match my original blog, so I am happy. However, this minor blog didn’t have any pics, so I don’t know if the pics would have transferred or not using your method.

I had originally used a temporary WordPress.com dummy blog to import from Blogspot to export an XML file because that step is listed in quite a few other tutorials. Then I was supposed to run your plugin, but it only looks for a Blogger Import, not a WordPress import.

Other sites instructions also say to use Custom Structure’ and enter the following in the box ‘/%year%/%monthnum%/%postname%.html’

Is this stuff for older versions of WordPress?

Using your method, do my blog post pictures also make the conversion?

Thank you sir, I tried reading all 112 comments, so I apologize in advance if this has been handled before.

I want to make sure that I can follow your simple steps and not use a temp WordPress.com import/export staging area.

Hey Damian,

This plugin simply ensures that the permalink part of the URL in WordPress matches what it was in Blogger (not including that .html part—that you have to handle with appropriate redirects). It’s one-time-use-only. After you run it, the permalinks are updated, and you can deactivate it and delete it.

It doesn’t have any impact on the import from Blogger itself, nor on the images embedded in your posts—that’s all up to the import script included with WordPress. So I’m not sure if the Blogger images are copied over to WordPress. I hate to say it, but I’m guessing not. Would be relatively easy to test though.

I’m not sure why other tutorials have suggested importing into a temporary WordPress.com dummy blog. You’re correct though, as far as I know, my plugin above only works if you’ve imported directly from Blogger.

As for the custom permalink structure, I prefer /%year%/%monthnum%/%postname%/, and then I have a redirect that updates any .html URLs to that. Some people can’t or don’t want to do a redirect, so they just use /%year%/%monthnum%/%postname%.html as their permalink structure. Either works.

Hope this helps.

Yes, it helps. The pix made it as long as I uploaded “uploaded_images” from my blogger dir. I had made a copy. Thanks, you plugin is great.

Damian, glad to hear it. Best of luck.

Dawn

This was very helpful. Thank you.

ok. I can’t figure it out. when someone clicks on- http://whosies.blogspot.com/2008/04/ending-bum-crack-one-pant-at-time.html
It redirects them to the main page, permalinks don’t change. any help?
plus, where is the htaaccess file?

Becky, I turned off JavaScript so I could look at what you’d put in your blogspot blog and I saw this:

window.location.replace("http://www.patchworkposse.com/blog/");

Which is why you are only getting redirected to the homepage. In order to redirect to the correct permalink page, you need to use the javascript snippet at the bottom of my post in order to correctly redirect to the new permlink for each post.

And you should find your “.htaccess” file in the root directory of your WordPress install which for you should be: blog/

Hi,

Firstly congratulations on a great guide. However I’m still confused by a few things. I’m planning to migrate from a Blogger custom domain to WordPress. Does the section ‘How to setup a Javascript Redirect’ apply? Because at the beginning you say you have to do this part ‘if you have a blogspot.com site.’

Yet surely once you migrate to WordPress, you transfer the custom domain and therefore your original blog becomes a blogspot blog anyway?

Also, when you move from Blogger to WordPress what happens to the ‘Labels’? Do this guide automatically transfer them into WordPress ‘Tags’ or ‘Categories’?

Thanks.

J, I haven’t had much experience with Blogger’s Custom Domains, but since you technically own the domain, and since I’m assuming that’s the domain you’re going to use for your self-hosted WordPress blog, then Blogger’s Custom Domain service and Blogger’s soon-to-be-extinct FTP publishing service are functionally the same. Which means you won’t need to worry about setting up a Javascript Redirect. Please let me know how it goes (feel free to send me email if you have any questions) so I can update this post with that info.

Thanks very much Justin. I’m still looking for a good WP template so haven’t begun migrating yet. But with a custom domain is this the best guide to follow therefore?

If so I’ll let you know how it goes.

Hi Justin,

Just about to use this plugin now but I’ve just read through all the comments and it brought up 2 questions in my mind:

1) If you’ve installed WP to a subdirectory, can you still run this plugin? I intend ultimately to re-direct WP so my original domain is the chief website (rather than mysite.com/blog), but read it was better to install WP in a subdirectory to start with. Will that affect this plugin though?

2) You also say this to one of the commenters: ‘my plugin above only works if you’ve imported directly from Blogger.’

I originally imported from Blogger, but because it only kept about 1/10th of all comments I deleted everything, exported all Blogger contents to an xml file & transferred it to a wxr WordPress file and imported them that way. Will this plugin still work for people who imported like that?

At the moment, in the WP dashboard, the permalinks I have checked render in the same way as Blogger, except WP includes all the words while Blogger cuts them off at a certain point.

J,

1) Yes, this plugin works if WP is installed in a subdirectory—in fact that’s the preferred method to install WordPress, regardless of whether you want your blog’s homepage to be http://example.com/ or http://example.com/blog/ (see: Giving WordPress its Own Directory While Leaving Your Blog in the Root Directory)

2) Correct, the post metadata that this plugin relies on to restore the generated WordPress permalinks to their original Blogger versions depends on the posts being imported using Blogger importer that comes with WordPress. Exporting from Blogger, then transforming that into WXR, then importing that will not allow this plugin to work. I’ve added a note to the instructions to make that clearer.

If you’re having trouble using the built-in Blogger importer, did you try re-running it? Sometimes your webhost may be capping PHP’s memory or execution time, which would cause the import to stall. But it’s supposed to not double import the same content if you run it multiple times.

Hmm that is a major stumbling block then :-(

On the import WP sees all the posts but only about 1/10th of the comments. Obviously thats a big problem for me, and the only way round it I found was to convert to a wxr, which had the added advantage of importing tags as tags and not categories.

Is there a way to perform this maintain permalink process for those who imported a wxr file? If not how can I work round the problem?

Forgot to say, I increased the memory size on the php files yet Blogger still only recognises 40 of about 700 comments.

Thank you! Thank you! Thank you!
You saved my life!!!

When I hit the Maintain Blogger Permalinks button, it says:

‘Sorry I couldn’t find any blogger_permalink custom fields, did you run the Blogger importer yet?’

Even though the custom fields are there; post #320, for instance, has this custom field:

blogger_748a3813c3b87b6ed84eb7f8571887e3_permalink

any ideas?

Nathan, it’s looking for “blogger_permalink”. I’m not sure where or what “blogger_748a3813c3b87b6ed84eb7f8571887e3_permalink” came from. What importer did you use?

After the importer from Blogger didn’t work (it said it imported but no posts showed up), I took some advice from message boards and imported it into a WordPress.com blog, then exported as WP from there into my WP-org blog. That might have screwed it up. If I fix the permalinks in my WP-com blog will it work?

Nathan, does every post contain the blogger_XXX_permalink custom field where XXX is always “748a3813c3b87b6ed84eb7f8571887e3″ or does XXX differ from post to post. Also what’s an example value for that blogger_XXX_permalink custom field?

The field is
blogger_748a3813c3b87b6ed84eb7f8571887e3_permalink for each post (blogger_XXX_permalink where XXX is constant). Example values are 2006355933192410032 ; 2248586069787747146 ; and 6160472712636248016 . By the way this blog was on a custom domain hosted through Google Sites, not a blogspot.com subdomain; don’t know if that makes a difference.

You don’t know how many hours I’ve wasted following tutorials that didn’t support subdirectory redirects from blogger. I’m so glad I found your tutorial. THANK YOU SOOO MUCH!!!

Hi there! I’m trying to finish the transfer of my blog from Blogger to WP and found you. I”m pretty sure I unzipped the file correctly (I’m seriously new at all of this), but when I tried to upload I got this error message: Incompatible archive PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Can you help me?

P.S. Sorry, forgot to say what I was doing:
trying to maintain the permalinks
TIA!

Hmm strange. I would try to download wp-maintain-blogger-permalinks-1.1.zip again, unzip it and extract wp-maintain-blogger-permalinks.php to your desktop, and then upload wp-maintain-blogger-permalinks.php to your wordpress plugins directory. Do not upload the zip file to your plugins directory though!

I’ve followed all the directions. Altered my htaccess file. Uploaded it. The permalinks are still redirecting to my old blog, not the new WP one. Pretty sure I uploaded the zip file to the plugin directly. Could never get the php file to upload.

Grace, not sure the issue you’re having with uploading zip/php files. Were you able to activate and run the plugin (steps 4 and 5)? Can you provide an example of a permalink for you old blog, and one for you new blog?

The only way I could activate and run the plug in was by uploading the zip file. Trying to upload it the other way kept giving me the same error that I showed you earlier.
Here is a post that has been imported to my new WP blog, but the link within it still goes to my current/old Blogger:
http://gratefulforgrace.com/2010/05/family-favorites-friday-great-fly/

TIA!

Ah. Your Blogger is blogspot-hosted, which means you need to set up a JavaScript redirect, which is described at the bottom of this post.

Justin- thank you. Do you have to deal with novices like me often?
It still doesn’t work. I cut and pasted and changed the part that needed editing. Still redirecting to my old blog/current blog. Would I need to undo anything I did in the previous actions?
Sigh.
I don’t really believe in cussing, but I am about to start.

Oh, and the Search Widgit isn’t working either on my sidebar. A friend says the two problems may be related. Some kind of stop action?
Any ideas?

Grace, I looked at your blogspot blog’s HTML source, and you edited the redirect script correctly, but you pasted it in a way that made all the lines run together. It needs to look like this: http://pastebin.com/5VTg86Dc (I cleaned up the extraneous lines just to make it easier to read).

Also, there’s nothing about this plugin that would affect any others. Once you successfully run it, it will update your WordPress permalinks to match what they used to be on Blogger, and then you can delete the plugin.

JUSTIN!
You are my hero!! My kids all came running because I started screaming with joy! ;-)
Thank you so very much!
Wish I could mail you some cookies!

P.S. What do you mean I delete the PlugIn? Do you mean now that things have switched, I delete the Maintain Permalinks Plug In in the plug in directory on Thesis??
I’m so nervous to lose everything.

still having some issues? just installed plugin, activated, and did a search on some of my posts that show on on the engines and still get the error

Grace, if you were successful in running the plugin, (by successful I mean you got to step 5 of the instructions and clicked the button “Maintain Blogger Permalinks” and then you got a message that said “Done!”), then per step 6, you can deactivate the plugin, and delete it from your plugins directory. It’s a one-time-use plugin. All it does is update the permalink values of your imported Blogger posts to match what they were in Blogger. This enables the javascript redirect that you put in the blogpost template to redirect to the new location for all posts.

thanks Justin – this will be great.

I see that you make the note that this won’t work if I’m importing an XMR file into WP. One of the problems that I’m having recently is that the WP importer isn’t capturing all of the comments. My work around has been using WordPress.COM’s importer (which works more reliably) and then downloading/uploading the data into WP.org.

Based on your note, I’m assuming that using that work around would eliminate the use of this plugin. Is that correct?

Any other tips on how to get the full Blogger data into WP.org?

Anbusivam

I moved from blogger to my own wordpress hosted domain a week ago. Was wondering how to re-direct all my blogger links to my new domain. Here I came and its done now. Thank you for your excellent, yet simple solution. Thanks Justin. – Anbusivam.

Anbusivam, thanks for the thanks. Glad to hear you were able to get yourself moved over to WordPress.

Hi again Justin
I tried redirecting my old blogspot blog at 7meow.blogspot.com to my current one at bloggercats.com using the javascript you’ve provided. Unfortunately it did not work for me.. Any ideas why? I also wanted to find out if the redirection only redirects the url or will it follow the permalink of the post?

thanks
LadyJava

LadyJava, I looked at the HTML source of 7meow.blogspot.com and I did not see the JavaScript redirect code (which should work for permalinks).

Oh i was playing around with another script just now hence I removed it.. didnt know you were going to check so soon.. do you think you can check again.. I placed the redirect again.

Justin – I’ve used your plugin numerous times over the last three months and it works flawlessly.

But today, I have a blog where the plugin never reaches “DONE!” it just spins and ends up in a 404 error. I imported using WP’s new Blogger Importer plugin in WP 3.1. Do you know what could be the issue/ problem? Could it be related to the 3.1 upgrade?

(the URL above is the test blog I’m working on where I’m having the problem)

Update: two days later, it works perfectly. I have no idea why I didn’t the other night, but glad to have it back! No need for a reply. thanks Justin!

Sharon, wow, glad to hear it ;)

Hi Justin,

Thanks so much for your great work on this. I’m in the process of a Blogger-to-WP migration, and had a quick question about using your plugin:

Before I was aware of your plugin, I took the advice to set my Permalinks setting to /%year%/%monthnum%/%postname%.html so that my WP links would match my Blogger links as well as possible. Needless to say, I’d rather have the traditional, clean WordPress links (i.e. without the “.html” added on).

Is it too late for me to run your plugin? If I now go back and change the link structure to be just /%postname% and then run your plugin, would that work?

Again, thanks for all the hard work you’ve put into ths.

Jennifer, if you’re right, adding “.html” to your permalinks is a bad idea, because sometimes WordPress adds things onto the end of the URL (like for comment feeds, etc). To answer your question, it’s not too late to run my plugin, change your permalink structure, and modify your .htacess file. Good luck.

Thank you! So very, very simple – will recommend to everyone I know!

I got all the way to step #8 and now I’m stuck on the .htaccess part. Help! This is all new to me. I can’t figure out how to modify with the code you provided.

Nevermind, I think I figured it out…I needed to do the Javascript redirect. Thanks so much!

Mae

Hi Justin,

I installed and activated your plugin, but never saw a button to click for Maintain Permalinks. Any suggestions?

Tye

I have a blog with blogger using a domain from yahoo. I recently purchase another domain from another host and started a new blog on wordpress. How can I forward my old blog & domain from blogger to the new Worpress blog & domain, without loosing my links?

This is a stupid question, but where do I find my htaccess file? On wordpress or via godaddy (where my site is hosted)?

Nikita, it should be in the same folder as WordPress is in on your webhost. In some cases, it might be in the parent directory. It’s prefixed with a “.” (period) which makes it a hidden file in unix filesystems, so you might have to enable “show hidden files” depending on how you are viewing the files in your webspace.

Christy B.

Curious … if the blogspot blog I am redirecting is indeed of the myoldblog.blogspot.com style, do I need to only set up the Javascript redirect or do I also need to adjust the .htaccess file as well?

Lester Fong

Recently I migrate Blogger to WordPress. Everything is working fine, except my PageRank. From PR3 to n/a. When I checked my new domain with backlink too, it shows nothing. Currently those indexed pages show as the old permalinks. They do redirect to my present new permalinks.

What have I done wrong here?

Lester, there is no way to seamlessly transfer PageRank from a Blogspot-hosted blog to a self-hosted WordPress blog. The only thing you can hope for is new PageRank.

However you might be having a problem with duplicate content on the web. I added a section to the bottom of the post recommending a change to your Blogger template to hide your existing post content from search engines and instead redirect them to your new domain name. Good luck.

bill

Hello, I am stuck on step 8. I went to add the code into my htaccess file and I could not find the #BEGIN WordPress block. Here is what my htaccess file looks like. Any help is appreciated.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Bill, just put it above all those lines (they are the “begin wordpress” block).

Holly

Hi,

I am getting the following error message when I try to upload the php file to my plugins area of WordPress:

Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

Any ideas?

Thank you!

Holly, I think it’s an issue with WordPress. Download the wp-maintain-blogger-permalinks-1.1.zip, unzip it on your desktop, and then just upload wp-maintain-blogger-permalinks.php to your plugins directory. Hope this helps.

I recently imported my blog from Blogger to WordPress, however after several tries, I just could not get the direct import tool to work. I also tried the direct import tool into a WordPress.com blog and got post headers but no content.

As a last resort, I exported the xml from Blogger and converted it into a WXR file. I am now struggling with trying to posts to redirect properly and was happy to see your suggestions, but not happy to see the part you have highlighted in pink about the pulin not working if I imported to WordPress through a WXR file.

So what am I supposed to do in this instance?! I’m so confused and have no idea about websites etc!

I would appreciate any help you can give.

April, a lot depends on how many posts you imported. If it’s not that many, you can always manually check the permalinks for each one and update them to match their Blogger counterparts. Feel free to email me if you have questions.

sean

In response to your below comment, would a cross domain canonical tag work to preserve PageRank? I’m thinking this tag could be added to header of blogger template.

“In this case, there is no way for you to transfer your existing PageRank from your Blogspot blog to an external domain name (without some creative DNS-wrangling and a lot of patience) because Google provides no means for you to set up a 301 redirect from a blogspot.com subdomain.”

Sean, according to Google’s Webmaster Tools Help page About rel="canonical", they do say that “You can use the rel="canonical" link element to specify the exact URL of the domain preferred for indexing.” In other words, yes, you can use rel="canonical" to redirect your accumulated PageRank to an external domain, even if you cannot set up a 301 redirect.

However, here’s the problem. Blogger offers no documented template tag that references only the permalink part of the URL, without the domain. All you get is the whole-shebang: <$BlogItemPermalinkURL$>. And you don’t have the full power of a pre-processing language like PHP to programmatically alter the domain of the permalink before it’s published. So there is no way to automatically publish a rel="canonical" tag in the header of your blogger template to redirect every post to a different domain.

Now it is conceivable that you could manually modify the title of every single one of your Blogger posts to be the URL of the post at the new domain, and then you could update your Blogger template to spit out the <$BlogItemTitle$> inside of a rel="canonical" link tag in the header, but I’ve yet to meet anyone who’s wanted to invest that much manual work for the sake of PageRank.

I am stuck on step 8. Probably a stupid questions but I don’t even know how to find the .htaccess file. How do I get to that? I am totally new to all this code stuff.

Never mind, I needed the java script one. Thanks!

I don’t understand the last part about duplicate content. Where would I paste the code you posted?

Nicole, you’d replace your current Blogger template with the code at the bottom of the post, making sure to replace myoldblog.blogspot.com and mynewblog.com with your old and new blog URLs. I’m not exactly sure how Blogger templates have changes these days, but you may need to select an option like “use classic or custom or advanced templates”…

I’m getting the same error mwssage as Holly below and have tried uploading the php file. I’m not sure I understand how the solution you are suggesting is different.

Hi Justin, how do I transfer a custom domain blog to own hosted WordPress? PR not an issue, SEO an issue.

I also want to know which template would be good for gadget blog, beside if I keep some old posts at blogspot and run my own blog at WordPress with popular blog moved to WordPress would that work?

After going through all the comments it seems I need some programming skills in php, apache, css and html5 to get a better hand, now the problem is if WordPress is so tricky why not try Drupal or Joomla? Help me with your ideas.

Raju, transferring a custom domain Blogger blog should be relatively easy. Since you own the domain name, you can have it point where ever you want. So in theory you can switch it from pointing at Blogspot to point at WordPress instead. As long as you can export your Blogger content to WordPress, and maintain the permalinks, no one will know the difference, and your SEO will remain unchanged. It would be a little more complicated if you wanted to keep some old posts at Blogspot, because they will need to have a new domain name, but that can probably be done with a little manual work.

As far as template recommendations, I’m the wrong person to ask, as I designed my own template. There are lots of WordPress templates sites out there, so just Google around for “good WordPress gadget blog template”. Good luck.

hu Justin, do you have a fix to maintain blogger permalinks if the importer did not work, and we had to use the export and convert to WXR method?

Mansi, there’s two options:

1) If you don’t have that many posts (say less than 100) you can manually compare the URLs of your blogger posts to the URLs of your WordPress posts and manually update the permalinks in WordPress to match the old Blogger ones.

2) I think I’ve written a script somewhere that Bloggerify’s your WordPress permalinks based on what I can know about their permalink style (dropping a, an, the, dropping special characters, truncating the length, etc). Let me know and I’ll see if I can dig it up.

Maybe I should just post it online, but I’ve hesitated because I can’t guarantee that the permalinks will match (for instance if Blogger has changed how they generate permalinks, or if there are special rules I don’t know about.) So I’ve just given it out on a case by case basis.

I am having a problem with step 8..I can’t find that file! HELP!!!!!

fRAN, what’s your problem with step 8? I need a little more information to go on to give you any help.

Making the switch from blogger to wordpress and I used this plug in. Everything went smoothly until step 8. I cannot find the .htaccess file anywhere. If I search all files it comes up, but the file is empty. So I cannot add the code. Any advice?

Megan, if you have “pretty permalinks” (aka “Month and Name” permalinks) there must be an “.htaccess” file somewhere. Perhaps contact your webhost and they may be able to help you.

Hi, I’m having the same problem as Mansi..I had to go from blogger to wp.com to wp.org and used a wxr file, and now I can’t get the permalinks to match..do you still have that script you wrote? There are like 1200 posts, so I really don’t want to do them manually!

Can you share it, please?

Krystyn, I’ll see if I can dig it up (or recreate it) and add it to this post.

Krystyn, in the end I updated this plugin to generate Blogger-like permalinks if you’ve imported your posts by a means other than the Blogger Importer (via WordPress.com or a WXR file).

I also significantly revised this post, as the advent of the Blogger 301 Redirect plugin obsoletes a number of my JavaScript-based strategies for redirecting content.

This plugin totally screwed up my site. I’m completely lost. I followed all the instructions up until the last step, and then my site went all weird, as well as the wp interface. Help! I’m thinking I’m going to have to uninstall wp and reinstall everything…

Jan, please feel free to send me an email. I’d be happy to try to help.

cs

Hi, I am looking at using your plugin, thanks for the awesome write-up. One question that I cant seem to find the answer to is: If I have a blog that is http://myshinyblog.blogspot.com and I want to move it to http://www.myfancybizsite.com/blog is this possible? The root of myfancybizsite.com is a wordpress install, its just that it is a business site and we want the blog to be something else besides the homepage. Also, is it possible to keep the existing wp permalink structure we have now (/%year%/%postname%/) using your plugin? Many migration tutorials I have seen around the web require .html to be tacked onto the end of the of the permalink structure, and we would prefer not to do it this way.

Thanks for any advice in advance!

cs, everything you describe is possible. my plugin updates your imported WordPress permalinks to their Blogger counterparts, and then the Blogger 301 Redirect plugin handles redirects from your Blogspot blog to your WordPress blog without needing “.html” on the end of your URLs. Hope this helps.

cs

Justin, thanks for the response – so the redirect to domain/blog is handled by the plugin as well? If so, awesome, cant wait to do this!

cs, set the plugin handles the redirect, by having you modify your old Blogger template. Good luck.

Sarah

So, will all of these same steps be followed if the current blogspot is already being redirected to a custom domain (the same domain that I want the WordPress to be installed in)? Are there any different steps to follow?

Sarah, in the case of custom domains, you can skip step 8, because your domain name is the same.

Hi Justin

I’ve been trying to drop html from incoming links using Sharon Huijs book ‘How to move from blogger toe wordpress’.

So I logged into my ftp client, went to the .htaccess file and pasted
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)\.html$ $1/$2/$3/ [QSA,R=301,L]

above the text: #Begin WordPress …. # End WordPress.

But then I get an error, and the page can’t be found.

Could you please help me out?

kind regards,
Nicole

Hi , thanks for the guide, i’ve moved from blogger to wordprss a month ago ,

till now i haven’t changed the permalink structure from ? URL/year/month/post.html ,

my question is may i change the permalink from the above to this one,

URL/post

, please do reply me..

Justin, i need your help. I used the wp-maintain-blogger-permalinks-2.1.zip and now all my links are broken (truncated). What can I do? I have more than 5000 posts with this problem.

Fantastic plugin and tutorial. It worked perfectly. Thanks a lot!

Jenna

Hi, I’m trying to download the zip file, but every time I do, it changes it to a php file. Any idea what’s up? Thanks.

Jenna, hmm, I was able to download wp-maintain-blogger-permalinks-2.1.zip just fine. I’ve emailed you it as an attachment.

I am not having luck with this. I am finding that if I take out the article (a) in one of my posts, THEN the page shows up just fine, but as it is, I get an Oops! page. Help! Do I need to unzip this first? (and how do you do that?)

Katelyn, sorry to hear you’re having trouble. It’s hard to tell from your comment what the trouble is though. Feel free to send me an email if you have any specific questions. For questions like “how to unzip a file” I would suggest using Google for help.

Michael

very useful plugin! thanks

This plugin save me! BEST PLUGIN EVER!! THANK YOU.

I’m trying to download the zip file, but every time I do, it changes it to a php file.

Never mind! I right clicked on the file and chose “Download Linked File” instead of left clicked it. Thank you!

Name

Email (optional)

Blog (optional)