WordPress database optimization is one of the essential tasks of keeping your WordPress blog speedy & healthy.
WordPress uses MySQL to create tables and databases to store data. Over time, you end up adding many redundant tables and databases. In order to keep your blog running smoothly, you need to remove all of these unnecessary things in a process called “database optimization.”
Along with this, WordPress features like post revisions and auto-saved drafts also add more weight to the overall database and need to be removed.
For post revisions, there are plugins that will let you limit the number of post revisions, but if you are not running a busy blog, instead of limiting post revisions, you can just clean up your blog once a month.
One of the major reasons for a slow WordPress blog is a huge database.
It’s highly recommended to keep optimizing your blog’s database once in a while.
Earlier, I have talked about the WP-DB Manager plugin which will not only optimize your database but will also help in automating database backups.
WP-Optimize is one of the simplest plugins, which will help you to perform the following tasks:
- Check your database size.
- Delete post revisions.
- Remove all auto-saved draft posts.
- Clean spam comments.
- Clean unapproved comments.
- Optimize database tables.
You can choose to use all of these features, or you can simply select a few of them.
Here is a quick tutorial to understand how to use the WP-Optimize plugin.
How To Use WP-Optimize: Settings & Usage Guide
Once you have activated the plugin, on your WordPress dashboard’s left bar, click on the WP-Optimize settings button.
You will now be on the WP-Optimize page where you can do all of the above-mentioned tasks.
(Ignore the numbers in the screenshot as I just used the plugin before writing about it, so my DB is pretty clean…)
Here are the features:
- Clean all post revisions: Whenever you save a post, WordPress keeps a revision of the old post by default so that you can restore to an older saved version anytime. If you have edited and saved a post 100 times, you have created 100 copies of that same post in your database. This is a useful feature of WordPress, but over a long period, your WordPress database becomes bulky. It’s a good idea to delete all posts revisions once in a while from your database.
- Clean all auto draft posts and posts in the trash: Similar to post revisions, WordPress’s auto-save drafts is a useful feature. It saves your posts while writing them in case your browser crashes midway through a post. Again, while useful, this increases your database size by a lot over time and emptying all of these auto-saved posts after a regular interval is a good idea.
- Remove spam comments and comments in the trash: If you are using Akismet or any other anti-spam comment plugin, you might be seeing lots of spam comments in the spam comment folder. This option will let you delete all of these spam comments with one click. It will also delete any comments that are in the “Trash” folder.
- Remove unapproved comments: This option will let you delete all unapproved comments with one click.
No go over to “Actions” and click on:
- Optimize database tables: It’s always a good idea to optimize your WordPress database at regular intervals to keep your database size at a minimum.
Whenever you go to the WP-Optimize settings page, you can see if your table needs to be optimized 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.”
If you have never optimized your WordPresss database before, this is a good time to do it.
Important: Make sure to take a database backup before you use any new plugin.
For more on databases, check out:
- How To Delete Custom Field Value From WordPress Database
- How To Optimize WordPress Database Size To Improve Performance
- [Fix] WordPress Database Table Doesn’t Support Repair Error
Let me know, which plugin are you using to optimize the database table of your WordPress blog? Share your suggestions in the comments below!
Don’t forget to share this post!
Subscribe on YouTube