I recently had to go through the nightmare of converting from standard WordPress installation to WordPress MU. The reason why I say “nightmare”, is because the process turned out to be rather complex and painful in terms of keeping all data consistent. My original plan was to simply export the data from WordPress standalone and then import it into WordPress MU. But after I imported everything, things did not work out as well as I hoped they would. For whatever reason, all of my categories and tags were messed up and when I went to the categories page in WordPress admin page, the categories showed 0 posts and the same thing happened with my tags.
I then tried to look for other ways to do this right and stumbled upon a suggestion in Google to simply rename the database table names. Everything seemed to work perfectly, until I started encountering database inconsistency issues with three separate blogs in one WordPress MU installation. It turned out that WordPress MU works by assigning one category/tag ID for the same category name that is used across different blogs. Inevitably, my categories and tags eventually started conflicting with different category IDs assigned to the same category/tag.
Wanting to fix this problem as soon as possible, I went back and tried to do it right from the beginning. It turns out that the best way to do it without creating any potential database inconsistencies is through export/import process within WordPress. Once I exported and imported everything, the problem with categories and tags not showing up came back to haunt me!
I looked at the data on table level and everything seemed to be mapped correctly, very similar to what I had in my original WordPress installation. I kept on digging until I accidentally tried something and it worked! I tried assigning the first WordPress post “Hello world!” to one of the categories and voila – it showed up! So, if you are experiencing the same problem with categories and tags in WordPress, here is what you should do:
- Make sure not to delete the original “Hello World!” post that gets automatically created by WordPress. If you have already deleted it, create a new dummy post that you can later delete.
- Make sure that the WordPress import process is successfully finished.
- After all posts and pages have been imported, go to “Edit” under “Posts” and edit the “Hello World!” or dummy post.
- Go through each of the categories and put a checkmark in front of every single category.
- Save the post.
- Visit both the “Categories” page in the admin section and the main page and make sure that all categories show up correctly with the correct number of posts attached to them.
This will fix the category mapping issue. Now let’s move on to tags.
The problem with tags is much more complex than with categories. If you have a large site with thousands of tags, you do not want to be manually inputting those one by one. Gladly, I found a good solution that worked for me!
You will need to have access to an SQL query tool to grab the tags data. Fire up PHPMyAdmin or whatever else you are using and type the following query against your current WordPress MU database:
SELECT CONCAT(wp_1_terms.name, ',') FROM wp_1_terms LEFT JOIN wp_1_term_taxonomy ON wp_1_terms.term_id = wp_1_term_taxonomy.term_id WHERE wp_1_term_taxonomy.taxonomy = 'post_tag'
The above query should return a bunch of lines with all of your tags with a comma at the end. Obviously, you will need to change the wordpress blog ID if you are using a different blog ID than “1″. Start from the top and select everything all the way to the bottom, then press CTRL+C to copy the tags data.
Next, go to the same “Hello World!” dummy post and copy-paste the tags data into the tags input field and save the post.
All of your tags should now be correctly mapped! :)







Thank you!! I’ve been banging my head for hours with the same problem!!!
Rob, you are most welcome!
thanks a bunch for this, just had a similar problem upgrading from wp 2.5 to 2.9.x. Your solution worked perfectly.
Mark, you are most welcome!
Насим, какой скин для wordpress вы используете в этоом блоге?
Влад, скин называется Lightword, но я сделал свои изменения :)
hello! I had the same issue moving from wp.com to wp.org software. I used your fix for my categories- do you think the fix will also work for a standard .org install and not a wp-mu install?
I did it exactly as you described, but was unable to get the categories imported. Do you know of any changes or fixes since february?
Thanks for your knowdleg
Lifesaver. Huge hassle importing a large blogger conversation for a client to wordpress and ended up having to set up a wordpress.com site for them then the self hosted and none of the catagories assigned.
(over 300!) This did the trick.
Thanks
Linda Lee
askmepc.com
Great post! I also noticed, as far as Categories go, that if you add a test/dummy category to any post, all your categories will appear. That’s what worked for me.