Razer Megasoma Review

Razer Megasoma is a hybrid of a hard and a soft mouse mat; If you love the softness of a soft mat but want to have the speed of a hard mat, Razer Megasoma delivers (this is debatable and I guess more like a personal preference). Razer Megasoma sits somewhere in between, combining the best [...]

Reduce WordPress CPU Usage #2: Uninstalling a WordPress plug-in completely







by Michael Aulia on 28 May, 2009

in Blogging



wordpress optimization tips series

Today, we are going to talk about how to clean up WordPress plug-in left overs / uninstall a WordPress plug-in completely.

Do you know that deactivating and removing a plug-in doesn’t necessarily mean removing its table entries on WordPress database? These tables and also record entries are cluttering your WordPress database and I’m sure it has an effect to your WordPress blog, even if not much.

I’m using a plug-in called “Clean Options” and a few manual ways to clean these up. So if you have installed/uninstalled a plug-in in the past (which I’m sure you have!), then check this post out.

WordPress Plug-in leftovers

With the help of a plug-in in which I will explain in more details later, I found out that there were table entries related to these past plug-ins that I used:

  • Gravatar plug-in
  • All in one SEO pack
  • alinks
  • Defensio
  • Download Monitor
  • Social Dropdown
  • Featurific
  • Genki Announcement
  • Global Language Translator
  • Mighty Search
  • My Dashboard
  • PostRatings
  • Social Bookmark Plugin
  • SEO Friendly Images
  • Sociable
  • Social List
  • WP-SpamFree
  • SezWho Comment
  • TanTan
  • Admin Management Extended
  • Easy Uploader
  • Enhanced WordPress Contact Form
  • One click updater

Crazy, eh? So here is how you can find out which plug-in leftovers are lingering in your WordPress’ database.

How to Uninstall WordPress plug-in completely

  1. Install a plug-in called Clean Options. The plug-in will look for truncated/orphaned entries on the wp_options table.
  2. Follow the instructions to identify options that are no longer being used by your blog (the plug-in detects this by analyzing whether there is any plug-in linking to the options).
  3. On the last step, you will be presented with the list of all orphaned options. Look at it one by one carefully and make sure that you really don’t need them anymore. Tick the ones that you want to remove.
    uninstalling plugin database
  4. After running the Clean Options plug-in, the entry on the wp_options table was down from about 1200 entries to 523 entries (meaning, there were about 700 unused entries/left over from uninstalled plug-ins!!)
    wordpress clean options
  5. Now, use your PHPMyAdmin application on your cPanel (or other application) to analyze your WordPress database (usually named _wrdp1 but it can be different on yours).
  6. Read through all the table names and find out tables that sounded like your old plug-ins or old themes that you no longer use. Tick and drop the tables (remove them)! If you are not sure, then don’t remove them. It’s better to leave unused entries there than removing a used entry accidentally!
    clean delete wordpress plugin table
    In the screenshot above, I can see tables left behind by alinks and SezWho commenting plug-ins. There were others but it won’t fit on the screenshot :)

These tables and unused entries can clutter your database. Since reinstalling a plug-in will install these tables back, it is safe to remove them (even if you are planning to use the plug-ins again one day). I’m not sure though whether removing these entries have any impact on the CPU usage but it’ll definitely have a bit of performance impact when your blog needs to grab these information from the options table.

Also, it will reduce the time and space needed when you are backing up your blog since you no longer need to backup these unused entries.

Check out my entire reducing WordPress CPU Usage series on my blogging guide series page.

Bookmark and Share



Subscribe Now

If you enjoyed this post, feel free to subscribe to be notified of new posts at Craving Tech!

{ 18 comments… read them below or add one }

Felipe 29 May, 2009 at 12:56 am

Hi,
Thanks for the tip.
I will see all the rest of yours posts.

Best regards,
Felipe

Felipe´s last blog post..Grandes Jardins em pequenos espaços

Reply to this comment

Harsh Agrawal 29 May, 2009 at 8:35 am

Hey Michael I told I will be watching your further blog posts for reducing your server load and optimizing your DB.
I’m still unsure if I should use this right now or now, though its referred by you, I’m giving it a try now :)

About that jqery prompt in the last blog post I talked about, that is beause when I change my post for comment love.. Though it should not happen.. So Either cross check at the support forum or ask the developer..

Harsh Agrawal´s last blog post..Microsoft Decision based search engine : Bing.com

Reply to this comment

Michael Aulia 29 May, 2009 at 8:06 pm

Thanks, Harsh. I’ll keep my eyes and ears open

Lyndi 29 May, 2009 at 1:56 pm

I have got to go and give this a try. The de-activated plugins do leave a lot of things behind. At present my database has all sorts of muck laying around. Thanks for sharing this.

Lyndi´s last blog post..Weekend Round-Up – 29 May 2009

Reply to this comment

Michael Aulia 29 May, 2009 at 8:07 pm

Maybe this issue will be taken care of the later WordPress in the future. Let’s hope so

Steve Yu 29 May, 2009 at 6:40 pm

Wow, there are so many plugins that you’ve installed!

Steve Yu´s last blog post..Portable Freeraser Securely Deletes Sensitive Data On the Go

Reply to this comment

Michael Aulia 29 May, 2009 at 8:07 pm

Whoops :D

George Serradinho 30 May, 2009 at 4:54 pm

Hi Michael,

thanks for the detailed post.

I have seen some plugin developers incorporating an uninstall feature, but not all do. I usually log onto my DB and remove it from there, I am confident enough to do it without making huge problems. I do always backup just to make sure.

It would be nice if WP incorporated this as having another plugin installed to remove entries is a bit of a drag for me. From Harsh’s one post about how many plugins should one have, I am trying to keep my installed plugins to a minimum.

George Serradinho´s last blog post..Transform your pictures with PhotoFunia

Reply to this comment

Michael Aulia 31 May, 2009 at 7:48 am

So I guess we can all blame the lazy plug-in developers! This is pretty similar with PocketPC applications leaving memory leaks or bad footprints

Curious Little Person 8 June, 2009 at 3:23 am

Nice Information! Never knew you had plugins to clean left overs from other plugins

Will try this plugin as I have used a lot of plugins on a trial and error basis, so i guess there’ll be a lot of leftovers

Cheers
Sandeep

Reply to this comment

Ricky 10 June, 2009 at 10:12 am

Great piece of information. I didn’t know about the left over of the plugins. Well i will give it a try to see how many extra entries are there.

Reply to this comment

Mujie 11 June, 2009 at 12:02 pm

Hi Michael, thanks for the tips. Suddenly, our web client got a problem because one of plugin not work. I try to uninstalled, but it doesnt work either. I hope with this tips, my problem will be gone :-) .

Reply to this comment

Michael Aulia 12 June, 2009 at 1:07 am

Did you remove the plug-in files completely from the wp-contents/plugins? It should be disabled automatically when you do

Atul 23 June, 2009 at 2:10 pm

great tips man

Reply to this comment

Glitch 31 July, 2009 at 10:02 pm

Thank you for this post, I didn’t know that sz_*** tables are generated by sezwho which I tested before. I deleted them already. :D
Glitch´s last blog ..My Entrecard Image Was Plagiarized My ComLuv Profile

Reply to this comment

Michael Aulia 3 August, 2009 at 10:00 am

Same here, they didn’t stay long on this blog :)

Mike 12 December, 2009 at 9:56 am

Michael, are you sure that this removal will reduce CPU usage?

Reply to this comment

Michael Aulia 12 December, 2009 at 11:53 pm

Well it isn’t much but if database gets bigger, surely it’ll have an effect on the speed or time to access the database? (this is of course, the worst case scenario when you have 1000 uninstalled plug-ins data cluttering the database). As I said on the post, the effect may not be much

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled

Previous post:

Next post:



ss_blog_claim=90a03beb48f2cae080e36591e278f2e0