Facebook Login and Facebook Sign Up General Safety Tips

How I Reduced The Size Of My Database

Recently I got a mail in my inbox from Hostagator that there has been a temporary block placed on my database. Although I already knew that my wordpress database is growing bigger and bigger but I never gave a look to it, until I got this mail. There may be many reasons for making a database bloat, although I do not have any good knowledge of database, SQL or any other programming languages but I did a quick research over the web and tried to optimize the database and reduces the queries.

The mail from Hostgator goes as follow:


This message is to advise you of a temporary block placed on your database. The database was found to be consuming an inordinate amount of processor time, to the point of degrading overall system performance. While we do limit each account to no more than 25% of a system’s CPU in our terms of service, we do not actively disable accounts until they greatly exceed that number, which is what happened in this case. Requests to this database may become degraded by limiting the maximum number of queries or connections for a limited amount of time, or if there are sustained issues, ultimately we may be forced to block access to this database until the issue has been resolved…………..

Steps I Took To Optimize My WordPress Database

1. First and foremost, you may need to optimize your tables. The frequency depends on the size and usage of the database, but most databases would benefit from doing something like this on a yearly basis: a) Enter your phpMyAdmin/MySQL control panel. Click on the database (not the table, the database name), and on the right hand column your tables should be listed. Scroll down till you see the “Check all”. Click on that link, make sure all database tables are checked and then from the drop-down next to it, and carefully select “Optimize table”. Please make sure to backup your database before taking any steps, so that you may restore your database in case of any problem.

Optimize WP Database

2. Then I logged into my cPanel and checked the size of my database, and it was huge, i.e around 500mb. So I decided to install a plugin known as WP-Optimize. WP-Optimize plugin allows us to remove post revisions, comments in the spam queue, un-approved comments within few clicks. This is the most easy thing that can be done to optimize the wordpress database.

3. Then I removed all the plugins that were inactive and are not in use. These plugins take space in our database and increase the size of our database.

4. I also removed few plugins that I used to track the visitors and the stats, because they consume a lot of server resources when your traffic is quite high. I moved on to a plugin known as Jetpack by WordPress.com. Jetpack is a WordPress plugin that supercharges your self-hosted WordPress site with the awesome cloud power of WordPress.com. Simple, concise stats with no additional load on your server.

These steps helped me to efficiently optimize my wordpress database, without the requirement of any SQL or database knowledge. These steps are easy for newbies too. There might be many more tricks that can optimize the database effectively, so if you any other trick then do not forget to share it with our users.

No related posts.

Article by

Admin is the Founder and Administrator of Tech Blog. He love to explore the tech world. He is a part time dedicated blogger, coder and designer of Xinz.

Sarami has written 309 awesome articles for us at Tech and Money Making Blog

| Facebook | Blog → Tech Blog

{ 2 comments… read them below or add one }

1 Suraj @Smartfatblogger August 24, 2011 at 7:55 pm

Very Nice post.
Thanks for sharing such a wonderful content!


2 Brian Crinion January 10, 2012 at 9:08 pm

Great tips. I was struggling with a 186Mb database, but now I’ve got it down to a more managable 55Mb.



Leave a Comment

Previous post:

Next post: