Clear orphaned post meta using WPCodeBox

Back to Blog

If over the lifetime of your WordPress site, you installed and removed plugins, it’s more than certain that your site contains orphan post meta. This meta is just filling up your database and slowing down your site—so let’s get rid of it! 

The fact that WPCodeBox can run code on-demand means is super useful for creating snippets that run only once. You won’t want to delete orphaned meta every time a page loads.

We added a new category, called maintenance to the snippet repository, that contains a snippet designed to clean orphaned post meta from the database.

You can download this new snippet directly from the snippet repository. All you need to do is set it tu run manually and then click the green run button that is at the top of the editor. By doing this, the snippet will run, and you can also check the output in the window under the editor. 

As you can see, on a relatively new local dev site, I already had 6 orphaned variations that were just sitting there, slowing down my site.

The Most Powerful Code Snippets Plugin

Save hours when customizing WordPress sites.
Manage Snippets in WordPress
Works with All Plugins
Send Snippets to the Cloud
A Better Code Editor
Conditionally Run Snippets
Works Locally, or In the Cloud

Get WPCodeBox, the most powerful WordPress Code Snippet Manager.

Save hours when customizing WordPress sites.
WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.