autoblogged
Registered Member
- Mar 7, 2009
- 88
- 63
Many of you who have worked with some kind of WordPress autoblogging tool have run into the issue of duplicate posts at one time or another.
It sounds like it would be an easy problem to fix but it is surprisingly difficult to prevent and we have been fighting this issue for years. And while we have for the most part had success fixing this, WordPress always seems to change something that brings the problem back.
Part of the problem is that WordPress can be doing several things at once and sometimes there are delays while WordPress handles things like trackbacks and pings. You also have concurrency issues on busy sites.
We did, however, come up with a pretty good solution recently by addressing duplicate posts outside of AutoBlogged and later in the posting process.
We created a simple plugin that hooks into wp_insert_post_data, which is the last thing WordPress calls before inserting the post into the database. We simply look to see if the post name has a "-2" suffix after it and if the post title itself doesn't also end with a "2" we kill the post.
Install and activate it like you would any WordPress plugin. There is no configuration necessary, it just starts working.
It works surprisingly well and should work with any autoblogging plugin out there. The only drawback is that you can't ever have any two posts, even manual posts, with the exact same title
Anyway, we'd thought we would share it with BHW.
It sounds like it would be an easy problem to fix but it is surprisingly difficult to prevent and we have been fighting this issue for years. And while we have for the most part had success fixing this, WordPress always seems to change something that brings the problem back.
Part of the problem is that WordPress can be doing several things at once and sometimes there are delays while WordPress handles things like trackbacks and pings. You also have concurrency issues on busy sites.
We did, however, come up with a pretty good solution recently by addressing duplicate posts outside of AutoBlogged and later in the posting process.
We created a simple plugin that hooks into wp_insert_post_data, which is the last thing WordPress calls before inserting the post into the database. We simply look to see if the post name has a "-2" suffix after it and if the post title itself doesn't also end with a "2" we kill the post.
Install and activate it like you would any WordPress plugin. There is no configuration necessary, it just starts working.
It works surprisingly well and should work with any autoblogging plugin out there. The only drawback is that you can't ever have any two posts, even manual posts, with the exact same title
Anyway, we'd thought we would share it with BHW.
Attachments
Last edited: