Support » Plugin: Custom Post Type UI » "Trash" feature to protect against accidental deletion?

  • Resolved exius


    I love this plugin and have been using it in a few of my sites… but just now I accidentally deleted a custom post type within “Manage Post Types”, and a hundred custom field input values (collected with Advanced Custom Fields) have been lost. The purpose of using Custom Post Types UI was for me to build a database of events, settings, and people, but if I can easily and accidentally delete it with 1 click, it gets me scared that I could lose years worth of data in a split second.

    So this begs the question, how would I be able to recover lost data after deleting a custom post type, and are there any future plans to replace “delete” with “trash” for protection against accidental deletion?

    Thanks again for this awesome product!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Beckwith


    Hi Exius. Sorry for the long delay when in a small bit of a crisis that you’re in.

    I have good news for you. The plugin doesn’t actually touch the post type content in your database. All it does is use the register_post_type() function with the arguments you provide for it via the UI portion. So your data is safe and nothing is deleted. All that you’ll need to do is set up the settings again for the CPT you want. The only *key* factor you need to for sure replicate is the slug you use. That’s the part you enter for “Post Type Name” in the add/editor screen. After you’ve re-set everything, it should all click again and your content available to display.

    Hi Michael,

    Thanks for the reply!

    Shortly after the disaster, I took at look at the database and everything still exists as you’ve mentioned. I had already create another custom post type with a different name and slug (not knowing the slug played a key factor).

    Fixing it the long way… In MySQL, I located my original post (or entry within deleted custom post type events) under wp_posts table and changed the my post’s post_type field to the new slug camps.

    It’s essentially the same fix, but yours would have been faster! Hope someone will find this information useful 🙂

    Plugin Author Michael Beckwith


    Awesome to hear you found your way nonetheless. Happy WordPressing 😀

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"Trash" feature to protect against accidental deletion?’ is closed to new replies.