Delete Custom Fields Using phpMyAdmin

Delete meta data store in your database manually with phpMyAdmin. Cleanup your wordpress database from junk data and save space in MySQL database.

Custom fields are helpful when you need extra post information along with your post. Some of the plugins and themes uses custom fields to display extra metadata for posts. Developers are in search of techniques to delete custom fields in wordpress.

Themes are using their keywords to insert data let’s take an example of this screenshot where theme is using their keyword buyad can be clearly seen.

delete-post-meta-from-phpmyadmin-manually

delete post meta from phpmyadmin manually

Delete custom fields using phpMyAdmin:

Deleting custom fields are risky for the non-experienced person. Here is the guide on how to remove custom fields manually from wordpress. Must remember to take a backup of your database so you can revert them back.

Recently twoclock were using smart-mag theme which uses _bunyad keyword, their entries are saved as _bunyad_ meta keyword.

Custom Fields WordPress

Custom Fields WordPress

Let’s get started,

  1. Open your phpMyAdmin and select your database having wordpress installed.
  2. Click on your wp_postmeta table and click on Search.
  3. Suppose i want to search the bunyad metadata so the search setting will be.
  4. In Meta_key column the operator will be selected as LIKE %…%. and value will be bunyad can be seen in screenshot.

    Like Query in Wp Meta Table WP

    Like Query in Wp Meta Table WP

  5. Now select the desired values and press delete from the bottom.

deleting-records-for-wordpress-meta-table


Finally remove the custom fields from WordPress posts:

After following the above steps you need to delete these keys as they are not for any work. Removing these fields needs your extra care because may be some error. Selecting and deleting them can’t close your website may be some error but website will not stop running.

Plugin & Theme Developers Guide:

This is for developers of the theme and plugins please always mention your theme name while describing the meta data like _abc_meta_key so other could easily delete your meta keys and value by searching with specific name.

 

Leave a Reply

Your email address will not be published. Required fields are marked *