WordPress database optimization is one of the essential task to keep your WordPress blog healthy. WordPress uses MySQL to create tables and database to store data. With time, you end up adding many redundant table data, database overhead in your database, and you should keep removing them to keep your database healthy.
Along with this, WordPress features like post revisions, auto-draft also adds more into database size, and you should empty all such tables to keep your database size low.
For post revisions there are plugins like limit the number of post revisions, but if you are not running a busy blog, instead of limiting post revisions, you can use plugin like WP-optimize once in a month to delete post revisions.
One of the major reason for the slowness of your WordPress blog is a huge database, and it’s highly recommended to keep optimizing your blog database once in a while. Earlier, I have talked about WP-DB manager plugin which not only optimize database, but also helps in automating database backup. Wp-Optimize is one of the simplest plugin, which will help you to perform following tasks:
- Check your database size
- Delete post revisions
- Remove all auto-draft posts
- Clean marked spammed comments
- Clean unapproved comments
- Optimize Database tables
You can choose to use all the features, or you can simply select any few of them and process it. Here is a quick tutorial for newbies to understand how to put Wp-optimize plugin to work.
How to use WP-Optimize to Optimize WordPress database:
Download and install WP-Optimize WordPress plugin. (Learn how to install WordPress plugin). Once you have activated the plugin, in your WordPress dashboard left bar, you can see WP-optimize settings link. Click on the link, and you will be on WP-Optimize page like this, where you can make do all the above-mentioned tasks.
Click on the link, and you will be on WP-Optimize page like this, where you can make do all the above-mentioned tasks.
I just used this plugin before writing about it, so there is no post revisions. I will quickly explain all the features, and you can select anyone want to use.
- Post revisions: Whenever you save a post, WordPress keep a revision of old post by default, so that you can restore to older saved version anytime. If you have edited, and saved a post 100 times. You have created 100 copy of the same post in your database. Post revision is a useful feature of WordPress, but in longer run it makes your WordPress database bulky. It’s a good idea to delete all posts revisions once in a while from your database.
- Remove all auto-draft posts: Similar to post revisions, WordPress auto-draft is a useful feature, which saves your posts while writing after the certain time. Again, this increases your database size in the longer run, and emptying all auto-draft posts after regular interval is a good idea.
- Clean marked spam comments: If you are using Akismet or any other anti-spam comment plugin, you might be seeing lots of spam comments in spam comment folder. This option will let you delete all spam comments with one click.
- Clean unapproved comment: This option will let you delete all unapproved comment with one click.
- Optimize Database tables: It’s always a good idea to optimize WordPress database at regular interval to keep your database size at minimum.
Whenever you go to Wp-Optimize settings page, you can see if your table needs to optimize or not. Here is a screenshot of my WordPress blog database, which needs optimization:
All you need to do is, select the features which you want to use and click on “Process”, and Wp-optimize will do the rest for you. If you have never optimized WordPresss database before, this is a good time to do it. Make sure to take database backup before you use any new plugin. I also, recommend you to check out clean-options WordPress plugin, which will help you to remove orphaned database tables.
- Read: How to delete custom field value from WordPress database
- How to move WordPress to new hosting company with 0 second downtime
Let me know, which plugin are you using to optimize database table of your WordPress blog?