• i have an article directory which has currently 10415 posts in 2 months .this is what i can see from the admin panel .

    https://kansari.com/wp-admin/

    but when i see the database table wp_posts it has like 28,145 total, Query .

    i have used serveral plugins in past also i have seleceted published post to become pending for review and then re-published .

    My question is do i have a lot of duplicate posts in the database with different primary key (post id).??

    how can i clean this mess up

    can i have any SQL query that will show and delete all the duplicate content..

    like i want to delete records that have the same post_content .what is the SQL query for that i know DISTINCT shows distinct values but what is the opposite .

Viewing 3 replies - 1 through 3 (of 3 total)
  • Instead of working directly on the database (which could lead to a constraints problem), I would first see, if you have a lot of posts in the trash and delete those.

    Revisions you should be able to delete with this SQL:

    DELETE FROM wp_posts WHERE post_type = “revision”;

    But beware! Executing an SQL has no “undo”-function. If you accidentally delete actual posts, they’re gone forever.

    So backup your database before you delete anything.

    Thread Starter kansari.com

    (@kansaricom)

    there is nothing in trash …i keep back up before any changes so no worries …why do u think the actual db shows more posts ..??how it happened ..is due to this ” i have seleceted published post to become pending for review and then re-published .”

    Thread Starter kansari.com

    (@kansaricom)

    i tried DELETE FROM wp_posts WHERE post_type = “revision”; on my local host and the pages in the menu disappeared …why ?but the r visible when i m logged in as admin ..but not to logged-out general users .

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wordpress database wp_posts shows more records than admin panel’ is closed to new replies.