Quickly change post type or taxonomy

It’s a matter of special satisfaction to me that, some tasks which resolve use special plugins, are can be resolved faster, than time spent for download and activate this plugin.

How to change post type, taxonomy in WordPress without plugin

Problem: How to quickly change post type or taxonomy (category) for many posts?

Solution:

1. Change post type 'post' to custom post type 'issue'

UPDATE wp_posts SET post_type = 'issue' WHERE post_type = 'post'

2. Change taxonomy 'category' to 'issues_category'

UPDATE wp_term_taxonomy SET taxonomy = 'issues_category' WHERE `taxonomy` = 'category'

Leave Comment

Your email address will not be published.