mattgadient.com

Deleting old WordPress database entries from MySQL

PREFACE: Back up your database before removing anything!!!

My WordPress database was getting pretty big, despite not having all that many posts all things considered.

I figured the biggest issue was drafts wasting space, although it turned out to be “revisions” which make up over half the “post” size of my database. If you make a post and then tweak it 10 times because it doesn’t look right, you’ve just saved that post to your database 11 times. UGH! I’ll get into cleaning those up another day though.

Looking through PhpMyAdmin, the other area I found to be a bit large was the wp_options table. I started looking through all the listings and found a lot of entries that were obviously for plugins I didn’t use anymore. Some I deleted off-the-hop, but others I wasn’t so sure about. Note that a nice fast way of detecting and removing these “possible orphans” is using a WordPress plugin I came across in my searching called Clean Options. It really helps narrow down what’s not being actively used.

In any case, looking up all these orphans took quite some time, but here’s a list of what I found out about some of them:

ai_ stuff
This appears to be leftovers from the All in One Adsense and YPN plugin
ai_120x240 — ai_120x600 — ai_125x125 — ai_160x600 — ai_180x150 — ai_200x200 — ai_234x60 — ai_250x250 — ai_300x250 — ai_336x280 — ai_468x60 — ai_728x90 — ai_adtype — ai_after — ai_archive — ai_before — ai_cat — ai_channel — ai_channel_ypn — ai_client — ai_client_ypn — ai_color_bg — ai_color_border — ai_color_link — ai_corner_style — ai_dfirst — ai_home — ai_lra — ai_nads — ai_nadspp — ai_network — ai_page — ai_post — ai_space
Yikes, quite a lot.  They hurt my eyes in notepad too. I was able to delete them successfully.

channel_id
chitika_id

These appear to be from Chitika Linx. I’m not 100% sure that it’s from this plugin but I don’t have any other Chitika plugins installed at the moment, and I did have Linx installed in the past. They deleted without issue.

ftp_credentials
I left this one alone. I know because of Apache permissions, some CMS programs allow you to enter FTP information to get around the permissions issues. I dont remember if WordPress does by default (I couldn’t find it just now), or if I had another program that asked for it, but in any case I decided just to leave it be.

lmbbox_filepress_options
I left this one alone. I could find a website that had a plugin and looked close enough (lmbbox.com/projects/lmbbox-filepress/) but I sure didn’t remember installing anything by that name, and for the life of me I couldn’t find any information on it in WordPress. Maybe lmbbox is something that wordpress has by default and the plugin just accesses it. I have no idea, and decided to play it safe, so I let it stay.

open_proxy_check
No idea what uses it, but it’s an extremely small entry (just a 1 digit number), so I left it alone.

sem_google_analytics_params
Appears to be the Google Analytics plugin (semiologic.com/software/google-analytics/) which I no longer use. I removed it.

sm_cpages
sm_options
sm_status

These 3 are from the Google XML Sitemaps Generator (arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/).

sm_log
First of all, this entry is HUGE. It took up over 1/3 of the total table space. It’s definitely from a Sitemap program, but I’ve used others in the past and am testing to see if it’s from the Google XML Sitemaps Generator mentioned above. I uninstalled the generator, deleted this without issue, and then reinstalled generator mentioned above to check. I’ll update the post later if it’s from this one.

tc_comment_encoding
tc_comment_format
tc_post_encoding
tc_post_format

I left these alone. The only plugin I saw that touches them is something called Text Control. I don’t remember having installed it, but I suspected (although I don’t remember why) that it might have been installed by WordPress by default.

wpsupercache_gc_time
I made an educated guess that it was a leftover from WP SuperCache. I removed it.

wpx_ stuff
These appear to be from Xinha4WP (an older WYSIWYG editor that doesn’t look like it’s being developed from what I can tell).
wpx_comments_enabled — wpx_comments_opts — wpx_general_opts — wpx_news — wpx_posts_enabled — wpx_posts_opts — wpx_static_js_comments — wpx_static_js_posts — wpx_general_opts
I removed them and didn’t have any issues.

_transient_timeout_wporg_theme_feature_list
_transient_wporg_theme_feature_list

It looks like these may have been installed by WordPress by default. These are the only 2 that the Clean Options plugin found as orphans, but there are a lot of _transient_ items that exist in the database which seem to be WordPress related. I left them alone.

acmetech_adsensedeluxe
This really looks like part of the AdSense Deluxe plugin from acmetech.com. It’s somewhat medium-sized in the space it takes in the database too. Since I’m not using it anymore, I removed it without issue.


 

So those were the items I came up with. Where they originated from are for the most part guesses based on a little research. If you’ve got a plugin installed that may be using them, don’t delete the record – I have no idea what will happen if you do.

Obviously if you’re removing any entries, backup your database first and remove at your own risk. I highly recommend the Clean Options plugin I mentioned at the top – it’ll make things a fair bit easier.

Finally, if you’ve come across other entries that you removed and you know where they came from, or have more info on the ones I posted, feel free to leave a comment to help others who may be in the same boat as you.

2 Comments

 | Leave a Comment
  1. I think you can remove open_proxy_check (defunct).

    Reason: http://core.trac.wordpress.org/ticket/3204

Leave a Comment

You can use an alias and fake email. However, if you choose to use a real email, "gravatars" are supported. You can check the privacy policy for more details.

To reduce spam, I manually approve all comments, so don't panic if your comment doesn't show up immediately.