Remove duplicate custom fields from WordPress using SQL query
After a redesign of a clients website and move to the new hosting environment we had experienced some problems with custom fields.
While importing the posts to the new SQL something went wrong and we ended up having duplicates of the custom fields on each and every post.
THE PROBLEM:
Duplicate custom fields on posts.
Larger database size
THE SOLUTION:
Remove duplicate custom fields from WordPress using SQL query
- Identify the duplicated fields from within your post.
- Go to your phpMyAdmin and select your database.
- Run the query from the code below and make sure to change the keys to match the ones you want to remove.
- Repeat