Remove duplicate custom field entries using SQL

Please note that this deletes only duplicate keys, not duplicate content. For instance, if you have multiple custom field with entries with the key subtitle all will be removed and only one will be kept.

2 Responses to "Remove duplicate custom field entries using SQL"

  1. Tevya   December 7, 2016 at 3:18 AM

    Thank you! A client’s site had 2 – 4 of the same custom field for the podcast episode. Not sure how they got in there, but they were just duplicates of the same info. I ran this and it seems to have trimmed it right down the way it should be. Thanks again!

    Reply
    • Mehmet   December 7, 2016 at 7:06 AM

      I am glad to hear that it solved your problem 🙂
      This issue is usually being caused by re-importing same XML file over and over again. At least this is what happened to us.

      Reply

Leave a Reply

Your email address will not be published.