I want to change the name of a custom post type after I’m using it for a long time.
The current name is registered like this:
register_post_type( 'toremove-name' , $args );
And I want it this way:
register_post_type( 'name' , $args );
If I change it, I think it will make problems in the DB.
Is there a way or a plugin to solve this?
I’m sure there is a plugin, but if you have MySQL access, you can also just rename the CPT the way you have indicated and perform am SQL query to update:
UPDATE
wp_posts
SETpost_type
=New CPT Name
WHEREpost_type
=Old CPT Name
;Also, don’t forget your taxonomies if you have any registered to the CPT. You might have to flush your permalinks after you performed this action