Optimizing your database is probably the last thing you thought about doing if you are simple WordPress blogger. Did you know that it can improve the load time of your website, clean up the admin panel (deleting spam comments, and trash posts), and solve database issues?
WordPress is huge and its database can get a little bloated if you have had it running for years and never thought to optimize it, and sure you can go into PHPMyAdmin and do it but then you are taking an extra step that distracts you from working on your blog. You also would still not remove the useless information that is probably left on your blog from years of use.
To solve this issue all you need to do is install WP-Sweep.
WP-Sweep is a very simple plugin that removes all the clutter from your database by cleaning a variety of items such as the following.
Revisions: All of the previous saves of your post/page.
Auto drafts: Extra saves of your post that WordPress makes automatically to make sure that none of your work is lost. (I don’t recommend cleaning this unless you have all articles published)
Deleted comments: Comments that you threw into the trash but have not been deleted completely.
Unapproved comments: Comments that you have not yet approved (I don’t recommend cleaning this one).
Spammed comments: Comments that have been marked as spam.
Orphaned post meta: Post meta that has been abandoned or left behind whether it was by a theme, plugin, or a duplicate post.
Orphaned comment meta: Abandoned comment meta that has been left over and was not properly deleted.
Orphaned user meta: Abandoned user meta that has been left over and was not properly deleted.
Orphaned term meta: Abandoned comment meta that has been left over and was not properly deleted.
Orphan term relationships: Abandoned term relationship meta that has been left over and was not properly deleted.
Unused terms: Unused tags/categories. If you have posts saved as drafts (I don’t recommend cleaning this).
Duplicated post meta: This will delete potentially duplicated post meta.
Duplicated comment meta: This will delete potentially duplicated comment meta.
Duplicated user meta: This will delete potentially duplicated user meta.
Duplicated term meta: This will delete potentially duplicated term meta.
Transient options: This cleans the WP-Transients which is a basic form of object caching.
Optimize database tables: This is the equivalent of optimize the database from PHPMyAdmin.
oEmbed caches in post meta: WordPress caches all oEmbed data to improve the performance of it when loading from the database. Delete this encase you have deleted posts that were using an oEmbed. Don’t worry if you have posts published using it the cache, it will automatically refill if the post is still published.
This will sweep all items in the above list and clean up your WordPress table dramatically. If you don’t have any posts drafted, or comments unchecked you might want to give this thing a solid click to see what years worth of garbage really adds up to.