Deze plugin is niet getest met de laatste 3 grotere versies van WordPress. Mogelijk wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

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).


  • 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.


26 september 2022
This is an extremely useful plugin. It removes thousands of uselessly accumulated posts that bloat the database of plugins that are no longer used.
19 juli 2022
This is my very first review. If I could give it 10 stars, I would. I love a clean WordPress installation. However, after using WordPress for some time, you get extra post types, most of which you can't even see unless you have a plugin or you know what you are doing. With this plugin I have been able to delete the extra post types that I'm not using, reducing the size of my WordPress installation.
27 mei 2022
Custom Post Type Cleanup is a brilliant example of a plug-in created for one task - which it does superbly! Well done!
7 oktober 2021
This plugin, even though it's over a year since its last update, still works as of this post date. I wanted to clean out all my custom post types. What the plugin found, in addition to the custom posts, were files that were left over from a previous theme I used years ago. This plugin cleaned all those files out.
26 mei 2021
It's always bugged me that this junk sticks around, not to mention the junk I end up leaving behind by registering a CPT, then testing with it, then realizing I don't need it, and removing it. I often forget to delete the posts first! Great plugin, thanks.
13 mei 2021
I had to delete 10,000+ posts from a plugin that was being deactivated and even thought the plugin had an Uninstall button, the server couldn't handle the quantity. This plugin solved the problem and let me fine-tune the batch quantity for deletion to a number that made the server happy. Saved me a lot of pain. Thanks!
Lees alle 29 beoordelingen

Bijdragers & ontwikkelaars

“Custom Post Type Cleanup” is open source software. De volgende personen hebben bijgedragen aan deze plugin.


“Custom Post Type Cleanup” is vertaald in 1 taal. Dank voor de vertalers voor hun bijdragen.

Vertaal “Custom Post Type Cleanup” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.



  • Add batch size option to admin form.


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