Support » Fixing WordPress » Leading ">" Character In Imported Posts

  • Resolved londoneer


    Hi folks, I’ve completed a wordpress installation locally using XAMPP, with a view to uploading it live in a few days.

    I’ve imported nearly 1000 posts from my old Blogger blog, and unfortunately both post titles and the first line of each posts have a leading “>” character (apparently its a recognised php error of some sort).

    I’m halfway to a solution but I need help going the rest of the way. I solved the issue of leading “>”s in the posts by running an SQL query on the local “mywordpress” SQL database which was set up as follows:

    update wp_posts set post_content = TRIM(LEADING ‘>’ FROM post_content);

    How can I modify that query to remove the “>” in the post titles? Can anyone advise – I don’t want to have to manually edit nearly 1000 posts!

    Can I also say how fantasically flexible and powerful WordPress is – Blogger is like finger-painting in comparison. The difference is staggering, and I’m still only beginning to get my head around it all.

    Thanks for any help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    I’ve not tried it myself, but from reading about it you may have better luck doing this:

    1. Create a free blog on WordPress.COM
    2. Import from Blogger to their first
    3. Export your WordPress.COM blog to WXR
    4. Import that WXR file into your self-hosted WordPress.ORG

    It seems like the importer on WordPress.COM is working better. Once you get it into WXR it should be smooth sailing from there.

    That’s a bit of a work-around, and given that I’ve succesfully removed the characters from the posts, there must be a way to run an SQL query that removes it from the titles surely?

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    Surely is, and when you find it please share! 😉 I’m happy to admit that I prefer an intellectually lazy solution sometimes.

    If you can get the update syntax right, that would be better. Maybe someone will reply with better advice; you can’t be the first to hit that problem.

    *bump* Any SQL experts out there that know what argument I need to pass to get these characters removed from my post titles?

    Problem solved – the string to pass in an SQL query is as follows:

    update wp_posts set post_title = replace(post_title, ‘>’, ”)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Leading ">" Character In Imported Posts’ is closed to new replies.