Detect and delete posts from custom post types that are no longer in use
As of April 2026, Custom Post Type Cleanup is a WordPress WordPress plugin with 1.0K+ active installations and a 5/5 rating from 35 reviews. It has been downloaded 27K+ times in total. Requires WordPress 5.9+ and PHP false+. Available on WordPress.org since 2017. Last updated 1 year ago — may have compatibility concerns. Downloads are down 6% this week.
Custom post type posts are left in the database if a post type is no longer registered (in use).
Plugins and themes can (without you knowing) use custom post types as a way to store data. These posts stay in the database forever if they’re not cleaned up by the plugin/theme itself upon deletion.
There are a lot of plugins that clean your database (by removing revisions, drafts etc.), but I haven’t found one that does a cleanup of unused post type posts.
This plugin provides an easy way to detect and remove posts from post types that are no longer in use. The settings page for this plugin is at wp-admin > Tools > Custom Post Type Cleanup.
Note: The proper WordPress delete function wp_delete_post is used instead of running a direct MySQL query to delete the posts. This way…
So I didn’t have to 🙂
Awesome little handy tool to clean up old sites from obsolete CPTs and their post meta.
I wish it also supported custom taxonomies that were registered for those obsolete CPTs.
Great plugin works perfectly
Thank you!
Its a really simple to use plugin and working right out of the box. A nice feature would be (if that is possible at all) to clean up abandoned taxonomies, too.
Thx for this nice plugin!
What a useful, little plugin! It helps clean up the database and keep it clean from old and obsolete CPTs.
Bravo to the developer who also swiftly updated it to the latest version shortly after my support request. What else can you ask for?
| WordPress | 5.9+ requiredTested up to 6.5.8 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.