StylizedWeb

Subscribe to our updates:

A Design, WordPress and Tutorials Blog.

Dedicated to helping you learn the art and science of the web.

Keeping Your WordPress Database Healthy

As far as site maintenance goes most WordPress users know the importance of keeping WordPress and plugins up to date. Some also know to keep frequent site backups. Few realize there is more to website maintenance than these two tasks. The health of your WordPress database is often overlooked.

To explain further, WordPress typically stores information (or data) on a MySQL database located on your web host. Storing information in a database, rather than in files, makes WordPress more flexible, capable and reliable. This is why most web based software use databases for information storage. Databases are not with out their drawbacks. It takes time to access a database, look up, retrieve it and display information. Typically the time required to perform these actions is negligible. The capabilities the database affords are worth the minor performance hit. Over time the database can become bloated however, this slowing down the entire site.

Not only are users intolerant of slow websites (many leave after 4 - 5 seconds of load time,) Google now includes site performance in their ranking algorithm. Suffice to say, you can no longer afford to have a slow website regardless of cause and many do because they have not kept their database healthy. To do so you must put your database on a diet, optimize your tables and eliminate the need for it altogether where possible.

Going on a Database Diet

The best way to address an "overweight" database is by slimming it down. This means optimizing the database by removing any old, unnecessary information (or tables.) You could login to your MySQL database and do this manually (if you are a gluten for punishment I highly recommend it,) but it's better to have a plugin do it for you. The choice is yours, I choose the later. The WP Database Optimizer plugin will delete excessive post revisions and other unnecessary information and you can even schedule it to run regularly.

This plugin takes care of obvious bloat, but misses the commonly overlooked pending comments. If you are like me you see pending comments much like e-mail, at a certain point it's not worth manually marking each one as spam which in turn causes them to build up to an excessive level. Those 5,000+ spam comments awaiting moderation are also slowing down your website (damn you spammers,) so you should probably clear them out. Of course WordPress doesn't make it easy to delete thousands of comments at the same time, so we will have to find a plugin to do it for us. Luckily the Delete Pending Comments plugin does just that. One click and some extra confirmation latter and your database is feeling lean and mean.

With your Database slimmed down you can move onto step two, optimize that sucka!

Optimize Your Tables

MySQL has an "optimize" function built in which defragments stored data. This reduces the time necessary to query a database and can reduce the file size as well. Again, for those of you who love pain you can do it manually... but I would much rather let the WP-Optimize plug-in do it for me. Beyond optimizing tables, WP-Optimize can also clean out the database making the two aforementioned plug-ins unnecessary. Three birds with one stone.

Now your database is lean and optimized, you should be good to go right? Not quiet, there is one last step. Eliminate the database where possible.

Don't Use the Database

There is no better way to reduce database associated slow downs than removing the database all together. Sound fanatical? Stay with me. I am not suggesting you find some way to run WordPress with out a database, rather use a caching plugin to reduce how often the database is used (my favorite is W3 Total Cache.) Caching plugins create a static version of your page the first time a user visits. Meaning, when the first users visits your page the database is accessed to generate the page. That generated page is stored on the server so the next time a user visits the page they are served that same pre-generated page and the database is left alone. When the page is altered, such as an edit or a new comment, the generate page is flushed and a new one is created.

This reduces most of the database associated slow downs. However, since some users will still encounter the database generated page it's worth getting your database trimmed and optimized as described above.

Summary: Set and Forget

The great thing about the plugins mentioned is most of them can be automated. Just install them once, schedule them to be run routinely and you have very little to worry about. It just takes the initial twenty minutes to get them installed and configured. Last but not least, the healthiest database is one with several backups. Make sure to backup your database frequently to prevent any unrecoverable issues.

Leave a comment on Stylized Web Have some feedback? Leave a comment

35 Comments So Far

  1. Pingback: Keeping Your WordPress Database Healthy | StylizedWeb.com : Brutally Succinct: curating web designer resources

  2. Those who want to enter the world healthy and permanent form, which is a product of choice for African Mango, now in Turkey. Because people prefer to use a 100% herbal product that helps people to enter the African Mango form a single product.

  3. Thanks, i will definitely check out these plugins..

  4. Hey really nice post actually i am looking for this plugins but i didn’t found anything about this but now i get the great post and i get what i want.

  5. Try to look for a gta san andreas game gta cheatcode for gta san andreas game…

  6. Really good Database tips, I a lot of these tips can go ahead and be used on many platforms.

    GJ

  7. An riveting word is worth scuttlebutt. I judge that you should compose writer on this subject, it power not be a preconception soul but generally fill are not sufficiency to talk on such topics.

  8. nice shared thx friens

  9. By Jaison posted on March 9, 2012 at 12:53 pm

    “Always going for the lowest bid won’t help in project quality or delivery” is true when we relate this to the top freelancing sites. Most sites do not offer expected quality and we clients end up in redo the project or post the same project to couple of sites online. Recently I registered with http://www.hireprogrammers.in, where they support, manage, maintain and test your project 24 x 7. We can track our project via shared time tracking tools. And Hireprogrammers also provides backup developers in case of unavailability and ensure that project always remains on track.

  10. guzel bir blog tesekkurler

  11. hos guzel tesekkur

  12. These are definately essential plugins for websites with huge traffic.

  13. oul but generally fill are not sufficiency to talk on such topics.

  14. Total diabetes control is something commonly overlooked by the media, doctors, dietitians/nutritionist, etc.http://allmenhealth.com

  15. Awesome information, I have been learning about many different things related to speeding my site up, and will be sure to adda thing or two from this post as well. I just start using optimize-db plugin, but i see that there is one called wp-optimize, now im wondering if you could use both plugins, or would that be poinless, as it seems that they both do the samething? Ok I know this question maybe silly, as I think I just answered it mself lol, ok great information mate and thanks for sharing.

  16. By Danai Panagiwtopoulou posted on April 5, 2012 at 10:02 am

    I am freelance web designer(currently working at http://www.peopleperhour.com)
    and i’m using wordpress like crazy!! I love it.. That’s really helpful! Thanks!

  17. Thanks this really helped
    I was also kind of worried about the fact that google didnt give my posts as much credit as it ought to have ( http://www.namakpash.com ) but now i understand what was wrong with my old posts :) THANKS ALOT

  18. I always encounter difficulty when “slimming down” all the plugins. They are all so useful in their own way!

  19. By Saranya posted on June 20, 2012 at 7:28 am

    When I posted the projects in http://www.hireprogrammers.in I am not sure about the project cost estimate, the current market trends and hire rates. Hireprogrammers technical team helped me to estimate my project and ensured getting the right talents to finish the work as expected.

  20. The information that you have provided in your post. It is really helpful. After studying your post, my understanding has improved substantially. Thanks I was studying some of your content on this site and I conceive this site is very instructive! Keep on posting.

    Website design company india

  21. This information is really very useful and helpful. Optimization of database is also very important. Thanks for sharing.

  22. My website account was temporarily suspended now and then for more resource usage. These plugins were highly helpful to reduce my Database usage :)

  23. Yes, some of the WordPress plugins discussed here can increase the efficiency of the blog’s loading time. Also don’t forget to use WordPress Dropbox plugin which backs up the database automatically.

  24. I just like the valuable information you supply in your articles. I will bookmark your weblog and check once more here frequently. I am somewhat certain I will be informed many new stuff proper right here! Best of luck for the next!

  25. It’s really a nice and helpful piece of information. I’m happy that you shared this useful information with us. Please keep us up to date like this. Thank you for sharing.

  26. Awesome post! I will definitely have to check out these plugins for my site. Thanks for sharing!

  27. A nice read. Thanks for sharing. I’ll definitely check out some of the plugins.

  28. A person essentially lend a hand to make critically posts I might state. This is the first time I frequented your website page and thus far? I amazed with the research you made to make this actual submit amazing. Excellent process!

  29. great post, thanks for sharing…

  30. Ukash is a virtual card that is used quite often by many countries around the world. However for use in some countries may vary. This completely depends on the implementation of the procedures of that country Ukash card. http://www.ucuzukashal.net For example, in some countries, Ukash card can be used as a credit card number in our country consists of only the card. Therefore, Ukash is used by many countries vary in terms of usage. As used in our country, which is much more secure Ukash card is a card security, and facilitate the use of the biggest advantage.

  31. For example, in some countries, Ukash card can be used as a credit card number in our country consists of only the card. Therefore, Ukash is used by many countries vary in terms of usage. As used in our country, which is much more secure Ukash card is a card security, and facilitate the use of the biggest advantage.
    http://ucuzukash.haberegel.info/

  32. For example, in some countries, Ukash card can be used as a credit card number in our country consists of only the card. Therefore,ligtv is used by many countries vary in terms of usage.
    http://canlimacizlemek.blogspot.com/

  33. We’re a California web development company with a lot to offer! Web design, website development, SEO, brand & internet marketing. Call at 408-868-4080.

    Website Development Company in California

  34. Je suiѕ entièrement en acϲord avec toi

    Ӎy աeb-site :: salopes asiatiques

  35. Ѕuperbe ɑrticle : comme d’hab

    Alsoo visit my wеƄ site … mature à gros seins

Leave a Reply

Your email address will not be published. Required fields are marked *

You may 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>