How to remove custom fields from WordPress

Ok. You’ve added custom fields in wordpress, but how can you remove them? How to delete custom fields wordpress Two…

September 29, 2013

delete old custom fields from posts in wordpress

Ok. You’ve added custom fields in wordpress, but how can you remove them?

How to delete custom fields wordpress

Two ways:
1) open your phpMyAdmim and search in the wp_postmeta table all the records that match your custom field name in the “meta_key” field and delete them. You can do a query like this:

DELETE FROM  `wp_postmeta` WHERE meta_key = 'test_field'

Just change “test_field” with the name of the wrong custom field that you want to remove.
2) if you don’t understand sql and phpmyadmin, look out for a plugin that handles custom fields to remove them.

Author

I'm a software engineer, an everyday web developer and a maker. I usually build sites with PHP, within or without WordPress. I build Internet of Things with Arduino and ESP8266. I'm the founder of Rockit.it and Dailybest.it and I'm actually the Chief Technical Officer of Better Days web agency.

Recommended

Modify wp_query for a specific category in category.php

Suppose you have a category called “events“, with a custom field with the date of the event, which is different…

April 8, 2016

How to add rel=”nofollow” to links with preg_replace()

Adding rel="nofollow" to external link is a good SEO practice.

September 22, 2015

Social buttons: the fastest way for WordPress, without plugins

NOTE: the code in this post is written for WordPress but you can easily translate it in any language. You’re here…

September 15, 2015

Optimize WordPress, a long list of tips

In the above image you can see your WordPress before reading this post, and after the optimizations you will make…

Limit the number of categories for posts in WordPress

CHOOSE ONLY ONE CATEGORY WORDPRESS If you need to limit the number of categories used by the authors of your…

September 14, 2015

Remove archive pages in WordPress, how to

I think that in most blogs (that is not all) archive pages are redundant content and there’s no need to…

September 8, 2015