How to delete duplicate posts in wordpress database:
Login to phpmyadmin and execute the following query:
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
or if you want just to have a look at the rows.
SELECT 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
Popularity: 1% [?]
Related posts:
- Update On Remove/Look for Duplicate posts in WordPress If you have edited some of the posts with the...
- Enable Disable comments in WordPress Globally enable comments for all users UPDATE wp_posts SET comment_status...
- How To Add Adsense between the Individual Posts on Blogspot for Advanced Templates I have recently started using adsense. I have still no...
- How do I put AdSense after my individual blog posts? This is the official blogger version of How do I...
