Move WordPress posts and related taxonomy to custom post type & taxonomy


Staff member
I have a clean WordPress installation using Twenty Eleven, with no plugins or other modifications. The blog contains approximately 800 posts with related tags and categories.

I'd like to move all these posts to a custom post type. By adding the following code to my functions.php my blog now has the custom post type installed and working perfectly.

//Add custom post type
add_action( 'init', 'create_en_post_type' );
    function create_en_post_type() {
        register_post_type( 'en_post',  array(
            'labels' => array(
                'name' => __( 'English Posts' ),
                'singular_name' => __( 'English Post' )
            'public' => true,
            'menu_position' => 5,
            'rewrite' => array('slug' => 'en'),
            'supports' => array(

//Add belonging custom taxonomy
add_action( 'init', 'build_taxonomies', 0 ); 
    function build_taxonomies() { 
    register_taxonomy( 'english_categories', 'en_post', array( 'hierarchical' => true, 'label' => 'English Categories', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'english_tags', 'en_post', array( 'hierarchical' => false, 'label' => 'English Tags', 'query_var' => true, 'rewrite' => true ) );

Now all I need is to change the regular post type to my custom post type. I've managed to move the posts using the plugin <a href="" rel="nofollow">Convert Post Types</a>, but my taxonomies aren't converted.

I realize I could just create similar custom categories and assign the custom posts to them, but what about tags? How can I convert these (automatically, 1200 tags)?

I've tried manually messing around in the database, but I can't make it work.