[Resolved] Deleting a custom post type leaves annoying remnants lying around database
So I created a Custom Post Type called “services”, I made some services and decided I wanted to change those services to child pages, so I deleted my custom post type via the Custom Post Type UI interface.
I created my child pages and went to view their webpage and it wasn’t displaying the right template.
Immediately I knew it was a database issue and when I looked at my database, I noticed a bunch of “services” under the “post_type” column in wp_posts.
I’m sure there are tons of relationships and such mapped to the old/deleted custom post type, and that’s what’s causing my example.com/services/foo pages to break.
Is this an inherit problem with how WP deletes custom post types? If not, can you update the plugin to actually nuke the custom post types from the database completely? If not, does anyone know of a plugin that will do that?
Update Simple enough to fix. Just SELECT * FROM wp_posts WHERE post_type = ‘services’, then delete.
I’m sure there are remnants somewhere else, but I’ll cross that bridge when I come to it unless someone has a more elegant solution.
- The topic ‘[Resolved] Deleting a custom post type leaves annoying remnants lying around database’ is closed to new replies.