Let’s talk, how you can Optimize WordPress Database of your WordPress website. Do you know, Optimizing WordPress database helps keep your website speedy and healthy?
Before we start, you should know the basics such as what is WordPress database and why should you be really concern about WordPress database optimization?
What is WordPress Database?
WordPress database stores the content of website or blog. The data is stored in WordPress Database in the form of tables. And these tables are called WordPress Database Tables. WordPress uses MySQL data management system for creation and storage of data in the form of database tables.
WordPress database stores:
- Blog posts, page content, comments and
- Other form of content i.e. team, portfolio data, deleted items which are sent to trash etc.
- Core WordPress settings i.e. your webpage settings, blog settings, plugin settings and of course theme settings as well.
- WordPress database also stores post revisions (autosave and manually), auto draft posts, posts in trash etc. This unwanted data occupies disk space on your hosting. However, this kind of data does not remain very useful for you, once the final post is published.
Why You Should Optimize WordPress Database?
Over the time many useless pieces of files (residual data) accumulate in your WordPress database. And if you do not optimize and cleanup your WordPress database, this residual data may become really large in size. This residual data causes your website to slow down, hence badly affect overall response of your site.
The process to cleaning up this unwanted residual data is call database optimization.
Large size of WordPress database might be one of the main reasons for bad response time and slow page loading speed of your site.
Therefore, in order to keep your WordPress website fast and healthy you must optimize WordPress database on regular basis.
Optimize WordPress Database using WP-Optimize
You can easily optimize WordPress database by using WP-Optimize plugin. Best thing about this WordPress database plugin is that it offers One Click solution for WordPress Database Optimization.
It also calculates and shows your database size and how much disk space you have saved so far, using WP-optimize plugin.
How to Use WP-Optimize Plugin (Step by step)
- Install and activate WP-Optimize plugin.
- Go to WP Dashboard > WP-Optimize.
- For multiple optimization with single click, select the options for optimization. Or you may optimize one by one, by clicking Run Optimization button next to each option.
- Click Run all selected optimizations. Optimization process takes a while depending upon the size of the database. Upon completion of process, it shows status and results of optimization.
Optimizations Covered by WP-Optimize plugin
- Optimize database tables:Don’t forget to check this option. By checking this box you are allowing WP-Optimize to optimize WordPress database and its tables to keep them in order to work properly.
Cleanup and Removal Options
- Clean all post revisions:When you make changes in a post, WordPress keeps an older version of that post. So that you can restore that older version anytime. Let’s say you updated a post 5 times then WordPress will keep 5 versions of same post. However these older versions are not at all useful for you. Because you are only concerned about the latest version of the post which you have updated last time. So it’s better to remove all other older post revisions
- Remove spam and trashed comments:Ahha! If your WordPress blog is bit older and performing well. Then you must be facing a lot of span commenting. WP-Optimize allows you to delete spam comments as well as comments in the trash.
- Remove all auto drafts:Auto draft is also same as post revision. When you write a post, WordPress auto saves your post after a fixed time. This is certainly a useful feature. In case something went wrong, you won’t lose all your post. But over the time these auto drafts increase the size of your WordPress database. So you should consider removing them.
- Clean all trashed posts:When you delete a post, it moves to the trash folder. And to delete it permanently you need to clean trash of your WordPress site. Once you decided to delete a post there is no pint of keeping it in the trash. Better you check the corresponding box to delete stuff in the trash.
- Remove unapproved comments:If you are sure that comments pending for moderation are spam. You can directly delete them by checking the box on WP-Optimize dashboard.
Items involve intensive database operations
- Remove expired transients options, Remove pingbacks, Remove trackbacks, Clean post meta data, Clean comment meta data, Clean orphaned relationship data: These database optimizations require little more attention than others. As the plugin author also mentioned in plugin notes that ‘These items perform more intensive database operations. In very rare cases, if your database server happened to crash or forcibly shut down at the same time as an optimization operation was running, data might be corrupted. Therefore you should take a backup before optimizing.’
Try it yourself
As I mentioned above check boxes for optimizations which you wish to run. And then hit Run all selected optimizations button to start optimization.
Database Optimization process took some time depending upon the size of the database.
When optimization completed it shows the statistics of the optimization as shown in image below.
WordPress Database Optimization is important to keep your WordPress site healthy and snappy fast. Cleaning up WordPress database also helpful when you are migrating your WordPress as it reduce size of database by removing unwanted data.
I hope this guide helps you to optimize WordPress database using WP-Optimize plugin. Which other plugin or method you use to optimize WordPress database, feel free to share with our readers. Or if you have a doubt about this subject, post it via comment below. I will be happy to help.