-
-
Save ashokdhaduk/13beb957868d8d4e90a71bfcc7268caa to your computer and use it in GitHub Desktop.
Renaming Custom Post Types and Taxonomies Through MySQL Query - Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQL query for renaming the posts: | |
UPDATE `wp_posts` SET `post_type` = '<new post type name>' WHERE `post_type` = '<old post type name>'; | |
SQL query for renaming taxonomy: | |
UPDATE `wp_term_taxonomy` SET `taxonomy` = '<new taxonomy name>' WHERE `taxonomy` = '<old taxonomy name>'; | |
# That should take care of all of the database areas. Just remember to match the new names in the code where the post types or taxonomies are registered. As far as I know, this is not handled in any plugins yet. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment