This article was original posted by me on March 13, 2007 and could be found at: http://thewrecker.net/?p=182

I feel like a total mug. When I first started using WP I wanted to be able to tag my posts so I installed the Ultimate Tag Warrior plugin. I thought tags were great for about the first week and then thinking of a suitable tag for a post just became a burden.

Then, recently, WP started to get really slow. My hosting has always been slow so I decided a move to a proper service was in order. I signed up for dreamhost (thanks, Cactus!) and went about transferring my WP blog.

Obviously I started by exporting the WP database and was shocked to find that it was over 50Mb! I had a quick look at the dbase in phpmyadmin and discovered that one table ‘wp_postmeta’ was huge. I googled a bit and found nothing of any real note; I figured it was normal. However, when I came to import the dbase through phpmyadmin on dreamhost it errored out over the size of the file. A quick google told me that phpmyadmin can’t easily handle such large dumps. Suspiciously abnormal again, I thought. So, I uploaded the dump to dreamhost and began the import process from the command line. After about 20 mins the job was still running and so I assumed it had hung. I stopped the job and dropped the whole dbase and decided to try later.

I just tried again now and threw in a verbose tag on the command line, which turned out to be a smart move because this is what I saw:

INSERT INTO `wp_postmeta` VALUES (131364, 117, '_utw_tags_0', '')

There were literally hundreds of thousands of these! A quick google for _utw_tags_0 bought up this page. Obviously that explains everything. I immediately disabled the plugin and ran a few queries to check how many of these entries there really were and then deleted every single one of them!

SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_utw_tags_0' AND `meta_value` = ''
DELETE FROM `wp_postmeta` WHERE `meta_key` = '_utw_tags_0' AND `meta_value` = ''

After that I ran optimize table from phpmyadmin and exported the dbase again. What was the final size? 500Kb.

I hope this might help others burden by crappily coded plugins.