4

I have imported a set of posts to a new Wordpress install recently. This OLD set of posts had a set of custom fields attached to it (via post_meta using the ACF plugin). The new installation has almost the same fields, with a couple of exceptions. On the posts that have the old (no longer used) custom fields the back-end is still showing those fields when I go to edit the post, even though I do not have them set up in the CURRENT Wordpress installation.

I can only assume this is because the values are in the database (via the import) so Wordpress is displaying them.

How would I go about removing these custom fields and values from the database safely so they do not show up in the post edit screen anymore on the new install?

2

As far as I know the custom key-value pairs are kept in the wp_postmeta table. You can simply examine (and delete) them in the database directly.

SELECT * 
FROM  wp_postmeta 
WHERE  meta_key LIKE '%you_old_key_name%'

The ACF configuration of the fields is another story, but you say that you don't even have the field in the new setup, so you shouldn't worry about that one.

Make sure you backup your database before modifying or deleting anything, just in case.

  • Thank you, this lead me down the right path and I was able to get it to go away. – Eckstein May 29 '13 at 2:56
  • @Eckstein I realize this is a very old post, but it would have been useful for other users if you posted an answer that describes the solution you used. This question was pretty useless for everyone else except you. – AyexeM Aug 1 '18 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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