This tutorial is for people that want to get rid of any custom fields that are no longer needed or left over by old plugins or themes.
The easiest way to delete custom fields is to install a plugin like Delete Custom Fields. Otherwise, you can go into phpMyAdmin and delete theme from your database tables manually or use a query.
Delete Custom Fields Plugin
This form will permanently delete custom fields you select along with any content associated with them. Before using this form, please make sure that you are not deleting a custom field used by your theme or plugins; just because you did not explicitly enter or create a custom field does not mean that it does not hold information used by your theme or plugins.
If you can’t find your custom fields module on all edit post screens, go to Screen Options in the top right hand corner and check then custom fields box to display the module.
Custom Fields Module
Here’s what the custom fields module looks like so you can decide which fields you want to get rid of.
Delete Custom Fields Using phpMyAdmin
If your prefer using phpMyAdmin, here’s the simple steps to removing custom fields manually.
- Login to phpMyAdmin and click the database in the left hand sidebar
- Click on the post_meta table in the left hand sidebar
- In the Sort by key: select PRIMARY (Ascending)
- Check the boxes for the custom fields you want to delete
- Scroll down to the end of the table and click the delete button to delete all checked fields.
Deleting unused custom and post meta fields is easy using phpMyAdmin or a plugin.
You may also want to optimize your database further and remove tables left over by unused and deleted plugins.