How to Clean Up and Optimize Your WordPress Database -Part I

Performance and page loading speed of your WordPress blog is highly dependent on cleanliness of your WordPress database. A cluttered, messy and heavy WordPress database would dawdle so its very important that you must clean up the trash out of it on regular basis.

I would be suggesting tools and methods to do it in a right way, it will definitely help you pump up your blog loading speed. Today in the first part of this series I would give you a tool with which you can optimize your WordPress database to improve its performance.

Dealing with database is always involve risk as some actions are not REVERSIBLE. Please try this if you know exactly what are doing

DB Manager WordPress Plugin

DB manager is a WordPress plugin that allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.

This will do most of the job to make your WordPress database hygienic. Some plugins, while you install, creates tables in your WordPress database, even if you uninstall these plugins later on for any reason various tables which it create still remain there in your database. But this plugin also help you get rid of such unnecessary tables created by plugins which you are not currently using/activated.

By default at the time of installation WordPress software creates only 11 tables

Namely;

  • wp_commentmeta
  • wp_comments
  • wp_links
  • wp_options
  • wp_postmeta
  • wp_posts
  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy
  • wp_usermeta
  • wp_users

If you love playing with plugins and try experimenting with new plugins, then surely there must be some tables in your database which are not in use, it will be a better idea to drop them. DB Manager plugin efficiently do this for you.

But you must care about the following before doing any action

  • You are not dropping ( means deleting) any of the 11 core tables as mentioned above created at the time of WordPress Installation.
  • You have to make sure the table you are deleting from your WordPress database is currently not in use by any active plugin.
  • The table you are dropping is created by to a plugin which is deactivated or already deleted from your WordPress Plugin admin.
  • You can also “empty” a table with the help of this plugin, this process will not delete it from your WordPress Database but will delete all the information stored in it. This way you can reduce the size of your database without deleting a table permanently.

Download DB Manager WordPress Plugin

In the second part of this series I will give tips you how to find out and get rid of images, which are uploaded in your WordPress wp-content-upload folder thus eating space but no-where used in your blog.

15 Responses to “How to Clean Up and Optimize Your WordPress Database -Part I”

  1. Ankit Kumar says:

    Thank you Sir,much needed tutorial on this.

  2. Thanks that you like it , hope it will solve some of your quarries

  3. Thank a ton sir the notes i was searching i found it . Great khoj

  4. Windows 8 says:

    Ohkie great plugin earlier I was optimizing the WordPress table via phpmyadmin, thanks for sharing

  5. I would say awesome tutorial you shared with all. You are really a good blogger and have depth knowledge in it. I first time read this nice post and learnt about it. You describe how easily we can do it…

  6. Anubhab says:

    I do a lot of experiment with the plugins. A really needful post for me.. Going to read the part 2 now.

  7. Great article on how to optimize a word press database using DB manager.

  8. I imported my old wordpress mysql database to a new database in my hosting account, then deleted the old one. The site’s showing up ok, as of now. So i’m wondering if I missed any step during the importation that might pose as a problem in the future. Did I do right?

    • What I understand here is that after importing your old WordPress database you deleted some of your old posts right. Well you can always do that. No harm in that. :-) That will help you rank good for keywords for which you are striving.

  9. thanks shankar fo rsuch a nice post ………..your this article is much more descriptive and very easy to understand …..

  10. Thank you sir,
    But for those who use cPanel PHPMyAdmin is also an option. :)

  11. silpada says:

    I have not worked on Word Press but I have read that it is content management system.Today I have read another feature of Word Press that is new for me.

  12. Hello – it appears that somehow in the past, wordpress saved multiple redundant post-meta for post revisions which are no longer in the database. As a result, I have a ton of post-meta that does nothing and is tied to posts that no longer exist. Does anyone know how to remove this data in myPHPAdmin with a SQL querey? Thanks in advance