Advertisement
pusatdata

Cara Menghapus Custom Field di Database

Apr 16th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. You may have once had a custom field in your post that you don’t use any more in your theme. Whilst you don’t use it in your theme, the data remains in your database. So, to clean up your database run the following in phpMyAdmin (remember to back up your database before performing this).
  2.  
  3. Log into to phpMyAdmin and select your database. Click the SQL tab at the top of the page and enter the following details. Remember if you use a different database prefix than the standard “wp_” one, then you’ll need to change that in the text below. Replace “meta_key” with your actual custom field name.
  4.  
  5.  
  6. DELETE FROM wp_postmeta WHERE meta_key = 'meta_key';
  7.  
  8.  
  9. This will then search your postmeta and delete any reference to that custom field and its data.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement