WordPress import from Blogger fails to import all comments

Alright, I was finally able to solve this satisfactorily.

Here’s the problem description, and the steps I took to resolve it. I hope this helps others. Try it at your own risk.

PROBLEM: I’d switched my Blogger FTP blog to a blogspot.com blog, installed WP on my host, and used WP’s Tools > Import > Blogger function, but while it imported all my posts (1,133), it only imported about half or so of my comments. I tried redoing it many times, with little change. I also scoured the support forums, and was pretty disappointed in the lack of advice to many people’s posts about the same or similar import failures.

SOLUTION: Here are the steps that worked for me:

1. I exported my partial WP blog (under Tools > Export) as a WXR file, just in case the following steps didn’t work and I’d need to re-import the partial blog.

2. In WordPress I deleted all the posts, comments, and categories from the partial blog, essentially leaving me with a blank slate. Note: Be sure on both the Posts and Comments pages, you switch to the Trash view and click the Empty Trash buttons (on both Posts and Comments!), or your import won’t work right (I learned this the hard way, and had to go back and start over to fix things).

3. In Blogger, I exported my blog as XML. This option is located under Settings > Basic, right at the top.

4. I used the converter at <a href=”http://blogger2wordpress.appspot.com/”>http://blogger2wordpress.appspot.com/</a> to turn my Blogger XML file into a WordPress WXR file. (Cheers to whoever created that, by the way!)

5. I followed the directions on the thread <a href=”http://wordpress.org/support/topic/277832?replies=17″>http://wordpress.org/support/topic/277832?replies=17</a> to increase the default WordPress import file limit. I’ll include and expand on the directions here:

a. Using your FTP program, locate the file “php.ini” on your web host. For me, this was located in a directory called “etc” at root. In other words, I navigated up a couple directories from my “html” directory to root level, then looked through various directories until I located the file “php.ini”. If your web host doesn’t give you access to root or you cannot locate this file the rest of the steps aren’t going to work for you. You may want to ask your host to do what you need to “php.ini” for you temporarily, just so you can perform the import, then have them put the limit back down to 2M or whatever it’s set at for your server.

b. Download “php.ini” to your computer and open it with a text editor. Don’t use MS Word or something! Use an app that won’t screw up the file, such as TextWrangler (free for Mac), or a Windows equivalent like TextPad or whatever it’s called.

c. In “php.ini”, you should see a line like:

;post_max_size = 2M

d. Remove the ;

e. Increase the size to something a little larger than the size of your WXR file. I increased mine to 20M, like this:

post_max_size = 20M

f. Add the following line right after post_max_size, so it looks like this:

post_max_size = 20M
upload_max_filesize = 20M

g. Save the file.

h. Using your FTP program, copy it back to the original location on your host, overwriting the old one.

* I don’t know if you’ll need to increase the WP_MEMORY_LIMIT in “wp-config.php” as mentioned by @samboll on the thread <a href=”http://wordpress.org/support/topic/277832?replies=17″>http://wordpress.org/support/topic/277832?replies=17</a>, but I didn’t have to, so I’m not including it here.

6. In WP, under Tools > Import, select “WordPress – Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.” You’ll be asked to locate/upload the WXR file you exported from Blogger in step 3.

7. After clicking “Upload file and import” button, the next screen will say “Assign Authors” and “Import Attachments.” I had already created a new WP User with my name, so I assigned all the importing posts to myself. Under “Import Attachments,” I originally chose to check the box for “Download and import file attachments,” thinking this might reassign my image links. It doesn’t. I tried this both ways, checked and unchecked, on two separate occasions, and didn’t see any difference at all.

If you have a lot of posts and comments, the upload and conversion may take a while. It took a little over 2 minutes for me, with 1,133 posts and about 1,000 comments.

If all goes well, you should end up with a long page of items like “Importing post Some Article Title… (2 comments)”. Switching to the Posts and Comments lists, you should check to make sure the quantities match up with what you had on your old Blogger blog. The importer should have converted Blogger’s “labels” to tags, and everything will probably be marked “Uncategorized,” so you’ll need to create and assign new categories.

NOTE: The above method did have the unfortunate result of nuking all my embed codes in all my posts, so embedded YouTube videos, for example, became “[youtube=http://www.youtube.com/watch?v=gaLDyrun_Cc]” in the post, instead of an embedded player. Looks like I’m going to have to manually fix all of those by going back to each Blogger post and copying the embed codes over to the posts in WP. Lame.

Otherwise, all my links and image links seem to be correct (although the img src links all point back to the original directory where my Blogger FTP blog used to publish, which in my case is fine, as I control both locations). If you can’t live with that for your circumstance, you’ll have to search for some way to fix that.

Good luck!

This entry was posted in tech and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>