WordPress Find Duplicate Post By Content

Is there any way to find similar/duplicate wordpress posts by post_content.

I have tried “Find Duplicates” plugin but it takes a lot of time to search since I have more than 7000 posts in my database.

Read More

What I want to achieve is search the posts published in current week with all the old posts and find similar posts and delete them.

Related posts

2 comments

  1. Try to use the following SQL query to fetch duplicate posts:

    SELECT p2.* 
      FROM wp_posts AS p1
      LEFT JOIN wp_posts AS p2 ON p1.post_content = p2.post_content 
       AND p2.ID < p1.ID 
       AND p1.post_type = p2.post_type 
       AND p1.post_status = p2.post_status
     WHERE p1.post_type = 'post' AND p2.ID IS NOT NULL
    
  2. I got a very good result using JetPack plugin by WordPress.com‘s Omnisearch.

    Install the plugin, activate it using a free WordPress.com account and activate the “Omnisearch” feature. Your tool is ready.

    Now open the post from where you want to take the post content to search, copy some text and try an Omnisearch with it. If a longer sentence is not effective, try a shorter sentence, most likely find its repeat.

    Let me know whether it works for you or not.

Comments are closed.