0

Some of my posts duplicate title. How to delete them ? And keep only one.

Example: I have 4 post which have same title. And I want to delete 3 posts and keep one post. How to do this ?

Thank you very much ! Sorry for my poor English !

2

2 Answers 2

0

The easy way is to look at the URLs of the posts (or the IDs) and determine what ones you'd like to delete. Then go to the all posts page and hover over the title of the post you'd like to delete, then click the red trash button.

0

I would log in to phpMyAdmin if you have access. You can run a SQL query to find the duplicates and delete the older posts.

You have to fill in your prefix but this query will get you started. I would make a backup and read this article first http://www.mysqltutorial.org/mysql-delete-duplicate-rows/

You can not get your data back without a backup.

DELETE t1 FROM wp_posts t1 INNER JOIN wp_posts t2 WHERE

t1.post_type = post AND t1.post_date < t2.post_date AND t1.post_title = t2.post_title;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.