Custom Post Type Cleanup


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 all associated post data (comments, post meta etc.) are also deleted from the database.

Since version 1.2.0 you can re-register unused custom post types for a limited period of time. This allows you to inspect and delete the posts like you would normally (in the wp-admin).

Zrzuty ekranów

  • Plugin page
  • Plugin page after re-registering unused custom post types.
  • Plugin page after cleaning up all unused post type posts


Follow these instructions to install the plugin.

  1. In your WordPress admin panel, go to Plugins > New Plugin, search for „custom post type cleanup” and click „Install now”.
  2. Alternatively, download the plugin and upload the contents of to your plugins directory, which usually is /wp-content/plugins/.
  3. Activate the plugin
  4. Go to wp-admin > Tools > Custom Post Type Cleanup and see if there are unused custom post type posts in the database.


7 listopada 2019
I have been looking for a plugin that can clean up these post types, but, most of the 'clean up' plugins only remove basic safe stuff like drafts... I can remove drafts myself! This one gets rid of those old post types that you created for a minute and never could get rid of in the backend. Thank you
15 sierpnia 2019
Didn't realise I had old post types (around 450) from uninstalled plugins. Other cleaner apps don't check this. This app was really reliable in finding the unused posts types and only the unused post types. Quick and easy to use. Thanks for this free tool!
8 sierpnia 2019
Thought I had just one unused custom post type from an earlier development stage, turns out I had several that I wasn't even aware of. Also takes care of old plugin data. Excellent plugin, thanks!
28 czerwca 2019
I hate it when I try out a new plugin and it leaves a mess behind. That's why I often use clean-up-plugins, but they almost never delte the old posts. So this plugin comes in super handy! And it works like a charm, too!
Przeczytaj 18 recenzji

Kontrybutorzy i deweloperzy

„Custom Post Type Cleanup” jest oprogramowaniem open source. Poniższe osoby miały wkład w rozwój wtyczki.


Wtyczka “Custom Post Type Cleanup” została przetłumaczona na 1 język. Podziękuj tłumaczom za ich wkład.

Przetłumacz wtyczkę “Custom Post Type Cleanup” na swój język.

Interesuje cię rozwój wtyczki?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Log zmian


  • Add batch size option to admin form.


  • Add ability to re-register unused custom post types.