[resolved] Leading ">" Character In Imported Posts (6 posts)

  1. londoneer
    Posted 4 years ago #

    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!

  2. 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.

  3. londoneer
    Posted 4 years ago #

    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?

  4. 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.

  5. londoneer
    Posted 4 years ago #

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

  6. londoneer
    Posted 4 years ago #

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

    update wp_posts set post_title = replace(post_title, '>', '')

Topic Closed

This topic has been closed to new replies.

About this Topic