Can’t delete CPT – failed to be deleted
-
Hey Hope all is well.
Great plugin thanks.For some reason when creating a CPT WordPress allowed me to create a post type with a space in the name. I tried deleting this post type but I get the error failed to be deleted.
Very similar issue this this one – https://wordpress.org/support/topic/cant-delete-cpt-or-taxonomy/
How can I remove this post type without damaging the current post types in place?
The page I need help with: [log in to see the link]
-
If you can go to CPTUI > Tools, and the “post types” tab, there should be a blob of content on the righthand side.
Copy/paste that blob to me, let me know the slug in question, and I should be able to remove the offending post type and provide back a refreshed blob that you could then re-import on that same settings page. All content created in your other post types will be fine, as we’re just affecting CPT settings for CPTUI.
Hey thanks for the rapid reply.
{"video_resources":{"name":"video_resources","label":"Video Resources","singular_label":"Video Resource","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Video Resources","all_items":"All Video Resources","add_new":"Add new","add_new_item":"Add new Video Resource","edit_item":"Edit Video Resource","new_item":"New Video Resource","view_item":"View Video Resource","view_items":"View Video Resources","search_items":"Search Video Resources","not_found":"No Video Resources found","not_found_in_trash":"No Video Resources found in trash","parent":"Parent Video Resource:","featured_image":"Featured image for this Video Resource","set_featured_image":"Set featured image for this Video Resource","remove_featured_image":"Remove featured image for this Video Resource","use_featured_image":"Use as featured image for this Video Resource","archives":"Video Resource archives","insert_into_item":"Insert into Video Resource","uploaded_to_this_item":"Upload to this Video Resource","filter_items_list":"Filter Video Resources list","items_list_navigation":"Video Resources list navigation","items_list":"Video Resources list","attributes":"Video Resources attributes","name_admin_bar":"Video Resource","item_published":"Video Resource published","item_published_privately":"Video Resource published privately.","item_reverted_to_draft":"Video Resource reverted to draft.","item_scheduled":"Video Resource scheduled","item_updated":"Video Resource updated.","parent_item_colon":"Parent Video Resource:"},"custom_supports":""},"recipe_books":{"name":"recipe_books","label":"Recipe Books","singular_label":"Recipe Book","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-book-alt","supports":["title","editor"],"taxonomies":[],"labels":{"menu_name":"My Recipe Books","all_items":"All Recipe Books","add_new":"Add new","add_new_item":"Add new Recipe Book","edit_item":"Edit Recipe Book","new_item":"New Recipe Book","view_item":"View Recipe Book","view_items":"View Recipe Books","search_items":"Search Recipe Books","not_found":"No Recipe Books found","not_found_in_trash":"No Recipe Books found in trash","parent":"Parent Recipe Book:","featured_image":"Featured image for this Recipe Book","set_featured_image":"Set featured image for this Recipe Book","remove_featured_image":"Remove featured image for this Recipe Book","use_featured_image":"Use as featured image for this Recipe Book","archives":"Recipe Book archives","insert_into_item":"Insert into Recipe Book","uploaded_to_this_item":"Upload to this Recipe Book","filter_items_list":"Filter Recipe Books list","items_list_navigation":"Recipe Books list navigation","items_list":"Recipe Books list","attributes":"Recipe Books attributes","name_admin_bar":"Recipe Book","item_published":"Recipe Book published","item_published_privately":"Recipe Book published privately.","item_reverted_to_draft":"Recipe Book reverted to draft.","item_scheduled":"Recipe Book scheduled","item_updated":"Recipe Book updated.","parent_item_colon":"Parent Recipe Book:"},"custom_supports":""},"eating_out-guides":{"name":"eating_out-guides","label":"Eating Out Guides","singular_label":"Eating Out Guide","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-food","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Eating Out Guides","all_items":"All Eating Out Guides","add_new":"Add new","add_new_item":"Add new Eating Out Guide","edit_item":"Edit Eating Out Guide","new_item":"New Eating Out Guide","view_item":"View Eating Out Guide","view_items":"View Eating Out Guides","search_items":"Search Eating Out Guides","not_found":"No Eating Out Guides found","not_found_in_trash":"No Eating Out Guides found in trash","parent":"Parent Eating Out Guide:","featured_image":"Featured image for this Eating Out Guide","set_featured_image":"Set featured image for this Eating Out Guide","remove_featured_image":"Remove featured image for this Eating Out Guide","use_featured_image":"Use as featured image for this Eating Out Guide","archives":"Eating Out Guide archives","insert_into_item":"Insert into Eating Out Guide","uploaded_to_this_item":"Upload to this Eating Out Guide","filter_items_list":"Filter Eating Out Guides list","items_list_navigation":"Eating Out Guides list navigation","items_list":"Eating Out Guides list","attributes":"Eating Out Guides attributes","name_admin_bar":"Eating Out Guide","item_published":"Eating Out Guide published","item_published_privately":"Eating Out Guide published privately.","item_reverted_to_draft":"Eating Out Guide reverted to draft.","item_scheduled":"Eating Out Guide scheduled","item_updated":"Eating Out Guide updated.","parent_item_colon":"Parent Eating Out Guide:"},"custom_supports":""},"nutrition_series":{"name":"nutrition_series","label":"Nutrition Series","singular_label":"Nutrition","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-carrot","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Nutrition Series","all_items":"All Nutrition Series","add_new":"Add new","add_new_item":"Add new Nutrition","edit_item":"Edit Nutrition","new_item":"New Nutrition","view_item":"View Nutrition","view_items":"View Nutrition Series","search_items":"Search Nutrition Series","not_found":"No Nutrition Series found","not_found_in_trash":"No Nutrition Series found in trash","parent":"Parent Nutrition:","featured_image":"Featured image for this Nutrition","set_featured_image":"Set featured image for this Nutrition","remove_featured_image":"Remove featured image for this Nutrition","use_featured_image":"Use as featured image for this Nutrition","archives":"Nutrition archives","insert_into_item":"Insert into Nutrition","uploaded_to_this_item":"Upload to this Nutrition","filter_items_list":"Filter Nutrition Series list","items_list_navigation":"Nutrition Series list navigation","items_list":"Nutrition Series list","attributes":"Nutrition Series attributes","name_admin_bar":"Nutrition","item_published":"Nutrition published","item_published_privately":"Nutrition published privately.","item_reverted_to_draft":"Nutrition reverted to draft.","item_scheduled":"Nutrition scheduled","item_updated":"Nutrition updated.","parent_item_colon":"Parent Nutrition:"},"custom_supports":""},"document_resources":{"name":"document_resources","label":"Document Resources","singular_label":"Document Resource","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-admin-page","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Document Resources","all_items":"All Document Resources","add_new":"Add new","add_new_item":"Add new Document Resource","edit_item":"Edit Document Resource","new_item":"New Document Resource","view_item":"View Document Resource","view_items":"View Document Resources","search_items":"Search Document Resources","not_found":"No Document Resources found","not_found_in_trash":"No Document Resources found in trash","parent":"Parent Document Resource:","featured_image":"Featured image for this Document Resource","set_featured_image":"Set featured image for this Document Resource","remove_featured_image":"Remove featured image for this Document Resource","use_featured_image":"Use as featured image for this Document Resource","archives":"Document Resource archives","insert_into_item":"Insert into Document Resource","uploaded_to_this_item":"Upload to this Document Resource","filter_items_list":"Filter Document Resources list","items_list_navigation":"Document Resources list navigation","items_list":"Document Resources list","attributes":"Document Resources attributes","name_admin_bar":"Document Resource","item_published":"Document Resource published","item_published_privately":"Document Resource published privately.","item_reverted_to_draft":"Document Resource reverted to draft.","item_scheduled":"Document Resource scheduled","item_updated":"Document Resource updated.","parent_item_colon":"Parent Document Resource:"},"custom_supports":""},"bite-sized_resources":{"name":"bite-sized_resources","label":"Bite-sized Resources","singular_label":"Bite-sized Resource","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-category","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Bite-sized Resources","all_items":"All Bite-sized Resources","add_new":"Add new","add_new_item":"Add new Bite-sized Resource","edit_item":"Edit Bite-sized Resource","new_item":"New Bite-sized Resource","view_item":"View Bite-sized Resource","view_items":"View Bite-sized Resources","search_items":"Search Bite-sized Resources","not_found":"No Bite-sized Resources found","not_found_in_trash":"No Bite-sized Resources found in trash","parent":"Parent Bite-sized Resource:","featured_image":"Featured image for this Bite-sized Resource","set_featured_image":"Set featured image for this Bite-sized Resource","remove_featured_image":"Remove featured image for this Bite-sized Resource","use_featured_image":"Use as featured image for this Bite-sized Resource","archives":"Bite-sized Resource archives","insert_into_item":"Insert into Bite-sized Resource","uploaded_to_this_item":"Upload to this Bite-sized Resource","filter_items_list":"Filter Bite-sized Resources list","items_list_navigation":"Bite-sized Resources list navigation","items_list":"Bite-sized Resources list","attributes":"Bite-sized Resources attributes","name_admin_bar":"Bite-sized Resource","item_published":"Bite-sized Resource published","item_published_privately":"Bite-sized Resource published privately.","item_reverted_to_draft":"Bite-sized Resource reverted to draft.","item_scheduled":"Bite-sized Resource scheduled","item_updated":"Bite-sized Resource updated.","parent_item_colon":"Parent Bite-sized Resource:"},"custom_supports":""},"podcasts":{"name":"podcasts","label":"Podcasts","singular_label":"Podcast","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-format-audio","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Podcasts","all_items":"All Podcasts","add_new":"Add new","add_new_item":"Add new Podcast","edit_item":"Edit Podcast","new_item":"New Podcast","view_item":"View Podcast","view_items":"View Podcasts","search_items":"Search Podcasts","not_found":"No Podcasts found","not_found_in_trash":"No Podcasts found in trash","parent":"Parent Podcast:","featured_image":"Featured image for this Podcast","set_featured_image":"Set featured image for this Podcast","remove_featured_image":"Remove featured image for this Podcast","use_featured_image":"Use as featured image for this Podcast","archives":"Podcast archives","insert_into_item":"Insert into Podcast","uploaded_to_this_item":"Upload to this Podcast","filter_items_list":"Filter Podcasts list","items_list_navigation":"Podcasts list navigation","items_list":"Podcasts list","attributes":"Podcasts attributes","name_admin_bar":"Podcast","item_published":"Podcast published","item_published_privately":"Podcast published privately.","item_reverted_to_draft":"Podcast reverted to draft.","item_scheduled":"Podcast scheduled","item_updated":"Podcast updated.","parent_item_colon":"Parent Podcast:"},"custom_supports":""},"mindset":{"name":"mindset","label":"Mindset","singular_label":"Mindset","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","can_export":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":"","enter_title_here":""},"health___wellness":{"name":"health___wellness","label":"Health & Wellness","singular_label":"Health & Wellness","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","can_export":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":"","enter_title_here":""},"calorie_charts":{"name":"calorie_charts","label":"Calorie Charts","singular_label":"Calorie Charts","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","can_export":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Calorie Charts","all_items":"All Calorie Charts","add_new":"Add new","add_new_item":"Add new Calorie Charts","edit_item":"Edit Calorie Charts","new_item":"New Calorie Charts","view_item":"View Calorie Charts","view_items":"View Calorie Charts","search_items":"Search Calorie Charts","not_found":"No Calorie Charts found","not_found_in_trash":"No Calorie Charts found in trash","parent":"Parent Calorie Charts:","featured_image":"Featured image for this Calorie Charts","set_featured_image":"Set featured image for this Calorie Charts","remove_featured_image":"Remove featured image for this Calorie Charts","use_featured_image":"Use as featured image for this Calorie Charts","archives":"Calorie Charts archives","insert_into_item":"Insert into Calorie Charts","uploaded_to_this_item":"Upload to this Calorie Charts","filter_items_list":"Filter Calorie Charts list","items_list_navigation":"Calorie Charts list navigation","items_list":"Calorie Charts list","attributes":"Calorie Charts attributes","name_admin_bar":"Calorie Charts","item_published":"Calorie Charts published","item_published_privately":"Calorie Charts published privately.","item_reverted_to_draft":"Calorie Charts reverted to draft.","item_scheduled":"Calorie Charts scheduled","item_updated":"Calorie Charts updated.","parent_item_colon":"Parent Calorie Charts:"},"custom_supports":"","enter_title_here":"Add Calorie Charts"},"Healthy Habits":{"name":"Healthy Habits","label":"Don't use","singular_label":"Don't use","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","can_export":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":"","enter_title_here":""},"healthy_habits":{"name":"healthy_habits","label":"Healthy Habits","singular_label":"Healthy Habits","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","can_export":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":"","enter_title_here":""},"plant_based":{"name":"plant_based","label":"Plant Based","singular_label":"Plant Based","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","can_export":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"My Plant Based","all_items":"All Plant Based","add_new":"Add new","add_new_item":"Add new Plant Based","edit_item":"Edit Plant Based","new_item":"New Plant Based","view_item":"View Plant Based","view_items":"View Plant Based","search_items":"Search Plant Based","not_found":"No Plant Based found","not_found_in_trash":"No Plant Based found in trash","parent":"Parent Plant Based:","featured_image":"Featured image for this Plant Based","set_featured_image":"Set featured image for this Plant Based","remove_featured_image":"Remove featured image for this Plant Based","use_featured_image":"Use as featured image for this Plant Based","archives":"Plant Based archives","insert_into_item":"Insert into Plant Based","uploaded_to_this_item":"Upload to this Plant Based","filter_items_list":"Filter Plant Based list","items_list_navigation":"Plant Based list navigation","items_list":"Plant Based list","attributes":"Plant Based attributes","name_admin_bar":"Plant Based","item_published":"Plant Based published","item_published_privately":"Plant Based published privately.","item_reverted_to_draft":"Plant Based reverted to draft.","item_scheduled":"Plant Based scheduled","item_updated":"Plant Based updated.","parent_item_colon":"Parent Plant Based:"},"custom_supports":"","enter_title_here":"Add Plant Based"}}
Healthy habits with a space .
Thanks
This should be good to reimport now https://gist.githubusercontent.com/tw2113/770376d87bb10d656d92bb72fc051a60/raw/ab279a4c6572d28861a1b16ea9af83ffc1d92aae/gistfile1.txt
Did this work out for you @sh2016 ?
- The topic ‘Can’t delete CPT – failed to be deleted’ is closed to new replies.