Custom Post Type Cleanup

Omschrijving

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

Schermafdrukken

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

Installatie

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 custom-post-type-cleanup.zip 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.

Beoordelingen

10 augustus 2020
Simple plugin that works great. Does exactly what it says. Saved me a ton of time
26 juli 2020
Within minutes of installing this terrific plugin, I was able to quickly identify and remove hundreds of old posts in my database from several very old and no longer used custom post types, thereby helping me shrink and streamline a bloated database. Huge thanks to the developer for providing this great tool for free. <3
31 mei 2020
This does exactly what it says on the tin and does it very well. I love being able to re-register them for a short time just to be sure of what I'm about to do. Great stuff!
7 november 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
Lees alle 22 beoordelingen

Bijdragers & ontwikkelaars

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

Bijdragers

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

Changelog

1.3.0

  • Add batch size option to admin form.

1.2.0

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