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.



     

Don't miss out winning these great giveaways currently running at Craving Tech:

Handy Backup Giveaway

           

{ 23 comments… read them below or add one }

Felipe May 29, 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 thread

Harsh Agrawal May 29, 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 thread

Michael Aulia May 29, 2009 at 8:06 pm

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

Lyndi May 29, 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 thread

Michael Aulia May 29, 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 May 29, 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 thread

Michael Aulia May 29, 2009 at 8:07 pm

Whoops :D

George Serradinho May 30, 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 thread

Michael Aulia May 31, 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 June 8, 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 thread

Ricky June 10, 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 thread

Mujie June 11, 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 thread

Michael Aulia June 12, 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 June 23, 2009 at 2:10 pm
Glitch July 31, 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 =-.

Reply to this comment thread

Michael Aulia August 3, 2009 at 10:00 am

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

Mike December 12, 2009 at 9:56 am

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

Reply to this comment thread

Michael Aulia December 12, 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

Hema Latha May 8, 2010 at 11:01 am

I used Clean-Options, but was unsure which one to remove or not.

Now i’m using Plugins Garbage Collector

It’s very simple and easy to use. I just click the delete button and it’s cleared off without even visiting PhpMyAdmin.

I had a severe CPU usage with HostGator and my site was Suspended for atleast 8-9 times within 3 days resulting in huge loss of money and visitors. Still i’m struggling to fix this. Your articles are very much useful. I have deleted/deactivated many plugins (But i love them a lot, and provided many features for the blog visitors).

If you want to host your blog with HostGator, then you have to forget using thumbnails. I’m not much satisfied with HostGator.
.-= Hema Latha´s last blog ..Indian Girl Sleeping Pics =-.

Reply to this comment thread

Michael Aulia May 10, 2010 at 11:14 am

Thanks for sharing about the plug-in, first time I’ve ever heard about it.

It’s funny with your issue, because my blog has been fine with HostGator and I’ve been using thumbnails. Previously I was using the Arthemia Premium which generated thumbnails dynamically with the TimThumb script + having 20-30 plug-ins. It was fine at all. Perhaps 1 of your plug-in messed it up? It can happen if the developer is lazy or if the plug-in is expensive in CPU

Vivek Parmar March 5, 2011 at 5:36 am

Already deleted plugin from wordpress dashboard but still some files will be left in database and causing problem for me thanks for this post which help me to delete the plugin completely thanks again

Reply to this comment thread

waseem August 7, 2011 at 5:48 pm

Thanks for sharing great tips,

Reply to this comment thread

Prashanth KV December 21, 2011 at 5:33 am

I could successfully remove some plugin leftovers using the plugin you mentioned. But could not find any trace of “Google Sitemap Generator plugin” which I uninstalled for some purpose.

Actually I need to uninstall it completely for a re installation but failed. Anyway thanks for this useful post.

Reply to this comment thread

Leave a Comment

CommentLuv enabled.

  Subscribe to future comments on this post

Previous post:

Next post: