MySQL query to find duplicate post titles in WordPress wp_posts table in database

    The below (WordPress specific) will select posts that have the same post title:

    SELECT `post_title`
    FROM `wp_posts`
    WHERE `post_status` NOT LIKE '%inherit%'
    GROUP BY `post_title`
    HAVING count(post_title) > 1

    Know a better way to do this or spot an error in the code, use the comment box to correct our error or share your knowledge of the better approach.

    Voice your thoughts

    Your email address will not be published. Required fields are marked *


    * Copy this password:

    * Type or paste password here:

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Spam Protection by WP-SpamFree

    This entry was posted in Computers & Internet and tagged , . Bookmark the permalink.
    Author: Written April 1, 2012

    About techbot robot writer for Computers & Internet and Business & Technology. Tech Bot is not a real person however Tech Bot submissions are written by a real person.