A common problem often encountered is the creation of duplicate posts in WordPress. This usually happens as soon as you start using automation plugins and/or feeds content to your blog via RSS.

This common problem is encountered often, and there is a plugin available to fix this : Auto Delete Duplicate Post, but it is set to run every time you publish a new post, so this will put some pressure on your blog.

You can also do it manually via MySQL:

DELETE bad_rows.*
from wp_posts as bad_rows
inner join (
select post_title, MIN(id) as min_id
from wp_posts
group by post_title
having count(*) > 1
) as good_rows on good_rows.post_title = bad_rows.post_title
and good_rows.min_id <> bad_rows.id

Note: Above example is when you have “wp_” as your table name prefix.

The above code is provided by comments from the WordPress Support Forum, as well as from Kieran Barnes – WordPress WP-O-Matic Duplicate Posts Fix.

Finally, I have just sent in an approval for WordPress to host a plugin which will help you do this, by adding another tool to your WordPress arsenal. The plugin will be free of charge. I will make an announcement when the plugin is released.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.