Manual Migration of WordPress Tables

I just upgraded wordpress while moving hosting from one supplier to another. To get my WP content back in my blog I just exported mysql tables and imported them. So far so good, but at one point WP moved from the categories table to some terms and term_taxonomies tables. Here are the SQL queries you need to get your stuff back running

insert into wp_terms (name,slug) SELECT cat_name,category_nicename
FROM `wp_categories`;
insert into wp_term_taxonomy (term_id,taxonomy) SELECT
term_id,'category' as taxonomy FROM `wp_terms`;
update `wp_links` set link_category=0;

Leave a Reply