Whereas seasoned WordPress pros know all about database optimization, newbies to the platform may be a little in the dark as to the why, when and how of the process. Essentially, optimizing your WordPress database gets rid of unwanted data and greatly improves efficiency and, therefore, performance.
As to the “why should I optimize my database,” consider this. Those who have been operating a WordPress site for a good amount of time have, probably unknowingly, accumulated lots of useless information and data such as outdated comments, spam, unneeded post revisions and the like. All of this “trash” puts a drag on your site’s speed and responsiveness by increasing your database size and making backups hog more disk space, which in the end hampers the user experience.
That said, the answer and solution to the question “how do I optimize my database” is quick and easy—one-click easy, in fact.
To begin—and this is vitally important—be sure to create a complete WordPress back up before moving on to optimization. Then, install and activate the WP-Optimize plugin, a very safe and reliable tool built and administered by the same team that has created some of the most wildly popular plugins WordPress has to offer. Once activated, the plugin will automatically add a new menu item in your admin area, and clicking on it will zip you to the plugin’s settings page.
Now you’ll see a list of operations that the plugin can and will perform on your database. Look at each of them carefully and uncheck any items that you don’t understand or are wary about (you can always do a little research and re-check those items later once your informed as to what they’ll do and satisfied that they’re safe). Important note however: items that appear in red require more intensive operations within the database, and if the process of optimization is interrupted at any time it may corrupt some of the data. Therefore, it’s important you pay special attention to step one and create a complete backup of your website before starting.
After choosing the items you want click the “run on all selected items” button and sit back and relax; the plugin will now do its thing and show you the progress. And believe it or not, that’s all there is to it. Your database has now been optimized, and you can feel secure knowing that your site is running at its very best.