Fixing blogger imports into WordPress

I’ve been expanding my Ozblogistan network and have run into an interesting bug.

When importing from Google’s blogspot, all post titles and post content wind up with the ‘>’ symbol prepended. This is annoying.

If you have database access, the fix is fairly straightforward:

update wp_posts set post_title = trim( leading '>' from post_title );
update wp_posts set post_content = trim( leading '>' from post_content );

If you have multisite enabled, like me, you need to run this query for each affected blog, with the correct table number. So for example, if you have blogs 1-10, and blog 7 is affected, the table name might be ‘wp_7_posts’ instead of ‘wp_posts’.

This entry was posted in Technical Notes. Bookmark the permalink.

Leave a Reply

Your email address will not be published. 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=""> <strike> <strong>