As some of you know, I've run into a few issues with my website this year. Let's just say that I've seen that "Internal Server Error" message more times in the past two months than I ever want to see.
Last week, everything went down - again. The main website, as well as aspects of all seven blogs. I contacted my webhost, Tera-Byte Dot. Com, and they informed me that I had over 220 database tables and over 7000 files. This slows things down to a grinding halt. The support team advised me to start going through the WordPress Support documentation, but to also be prepared to delete everything and start from scratch.
Words no blogger or website owner wants to hear.
I whined to my brother and colleague before taking the next step. That's when he asked, "Have you read any of the documentation on "database bloat"?"
Database what?
A quick Google search revealed 108,000 hits for "WordPress Database Bloat". Strangely, I was relieved to hear that my websites had a common affliction. At least, I had my starting point and I did not have to blow all my sites to smithereens and start from scratch. I was off to find helpful tutorials.
First, I followed Kimberly Castleberry's instructions in her article Is Your WordPress Blog More Than 2 Years Old? Fixing Database Bloat Issues!This required me to be a brave trooper and log into MySQL and pHpAdmin. With 220+ tables, I was glad that Ms. Castleberry spelled out what I needed to delete.
Once I completed that, I was able to log into my WordPress network admin dashboard. You can imagine how relieved I was to be able to do this.
Next, it was time to prevent this mess from happening again. I found Narga's article Prevent Hidden Causes by Clean up WordPress Database Bloat Issues. I decided to purchase and install GDragoN's WordPress plugin Smart Cleanup Tools as it is compatible for WordPress Multi-site installations.
Perhaps if I only had one website to maintain, I would have taken the most secure route of doing my website database maintenance in MySQL and pHpAdmin. However, you have to keep in mind your skills and the time you have available to deal with such things. Using Smart Cleanup Tools on all my WP sites saves me time and headaches.
I already mentioned that it is WP-MU compatible. The other thing I like about it, is that Smart Cleanup Tools allows you to schedule database clean-up at regular intervals at the click of a button.
The final thing that I did to help manage my database size is limit revisions of posts. One of the reasons that I had over 7,000 files is that WordPress dutifully saved everything! Every spam comment, every comment, every auto-save draft and every revision.
I used this Revision Control plug-in which is specifically for multi-site installations. If you only operate a single site, then use this one.
Fellow entrepreneurs, please note that you will only battle database bloat if you have a self-hosted WordPress site. If your website or blog is hosted on Wordpress.com, then WP takes care of all this for you.
However, most WP users who are uses WordPress for business will have a self-hosted website or blog through WordPress.org . More control, many cool design templates to choose from and the clincher for me: the ability to control operate all my blogs and my main site in a single network.
Those in the same Wordpress.org boat as me will have to tackle database bloat sooner rather than later. They will also have to clean up their databases on a regular basis.
So far, everything has been working smoothly. Page load times have sped up incredibly, so it seems that my website and blogs have been cured of database bloat. Now, I can put my IT hat down for a while and put the teacher/consultant hat back on, thanks to WordPress Support forums, Narga, Kimberley Castleberry and GDragoN.