Notice: Trying to get property of non-object in /home/wpcmsnin/ on line 25

Clean Up Orphaned postmeta Data

, ,

Sometimes you run into a time where you need to go into the database and delete items from the posts table.  So after doing this you could have a lot of extra data getting stored in the postmeta table that is no longer needed.  This is a simple MySQL command that can be run to clean this data up and optimize your database.  It checks to see if the post ID is still in the posts table for the postmeta information and if it does not then it deletes it.



Posted on

September 30, 2016

Submit a Comment

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