I ran a couple of queries to get rid of the (now un-needed) <br /> tags I had in posts and comments from b2. I think it went fine but let me know if you see anything that looks out of place.
To clean up your posts table (assuming you are using a ‘wp_’ table prefix):
UPDATE `wp_posts`
SET `post_content` =
REPLACE(`post_content`, '<br />', '');To clean up your comments table (again, assuming you are using the ‘wp_’ table prefix):
UPDATE `wp_comments`
SET `comment_content` =
REPLACE(`comment_content`, '<br />', '');Note: This will remove all of the <br /> tags, so make sure that is really what you want to do. 🙂
That’s helpful. What if, say, I wanted to change or add categories to a whole lot of entries (in WP)? Is that possible? 🙂
It’s quite a bit harder now that WordPress supports multiple categories. You need to insert rows into the wp_post2cat table.
I really wish I had seen this sooner. I went and removed them all manually. Argh. What a pain. Fortunately it was only for a couple hundred and not over 600 like yours.
No More Opening Links in New Windows
I finally got around to changing all of my target=”_blank” links to rel=”external”. Using a similar technique to the previous database cleanup, I ran these queries through PHPMyAdmin.
Fix Posts…