Database Optimization in WordPress

WordPress Stores All Content in a Database

All your WordPress website content (yes, all of it) is stored in one place–your database.

The importance of a clean and optimized WordPress database cannot be overstated. Over time, your database becomes filled with extraneous data (revisions, trashed pages and posts, spammed comments, pingbacks, trackbacks, etc.), especially if you update your WordPress website regularly. A bloated database negatively affects your website’s performance. This is why database optimization in WordPress should not be ignored.

How many miles would you drive your car without changing the oil? Just like your car’s performance will suffer without regular maintenance, so will your WordPress website’s overall performance suffer without ongoing and consistent database optimization and cleaning.

Removing superfluous data can significantly lighten your website and make your pages load much faster. Doing so is easy.

Optimize Database After Deleting Revisions – A Useful WordPress Plugin

Database optimization in WordPress can easily be accomplished via the use of a plugin. Some folks will direct you to phpMyAdmin, but this is unnecessary in most instances and takes significantly more effort and technical skill.

Simply install the plugin called Optimize Database After Deleting Revisions and it will automatically take care of your WordPress website’s database optimization.

Many similar plugins exist and I’ve tried most all of them (the good ones anyway).

If you don’t know how to install a plugin, head back to Step 3 and watch the video. If you don’t even know what a plugin is, reading the FAQ might be a good idea.

Once you’ve installed Optimize Database After Deleting Revisions, you can access the plugin’s settings by hovering over Tools in your WordPress administrative dashboard and clicking Optimize Database.

database optimization in WordPress - sidebar link

Click it and it will take you to the Settings page. Once there, click the Change Settings button.

optimize database settings page

On the next page, check all the boxes in the first section. You don’t have to check the box that says Maximum number of . . . If you leave it unchecked all revisions will be cleared. Or you can specify a number of revisions you want to keep per post/page.

Check none of the boxes in the second section. This allows for optimization and cleaning of everything.

You will also see an entry entitled Scheduler. Set a schedule, if you wish, using the dropdown menu. For a long time, I didn’t use the scheduler. After writing this tutorial, I’ve now set the scheduler to run an optimization daily, at 4AM.

Once your settings are in order, click Save Settings.

wordpress optimize database settings

Keep in mind that if you check the box titled Show ‘1-click’ link in Admin Bar, you will add the Optimize DB (1 click) link to your admin bar at the top of your WordPress website. It will always be visible when logged in. Click it whenever you feel like running a database optimization.

optimize db 1 click WordPress

If you check the box titled Show an icon in the Admin Menu you will add an Optimize Database entry into your sidebar on the left side of your administration dashboard. That link will take you to the plugin’s settings.

optimize database WordPress sidebar

After you have clicked Save Settings, you will see a confirmation message that your settings have been saved. Within that message will be a link to run your optimization. You can also click the link that says Optimize DB (1-click) and your optimization will run.

After running your database optimization, you’ll see a screen that gives you all the results of the optimization. At the bottom you’ll see a message that reveals the total savings for the current run and the total savings since the first run.

optimize database WordPress total savings

Summing Up Database Optimization in WordPress

Database optimization in WordPress requires your attention! Like a car requires maintenance, so your WordPress database needs consistent care.

If you neglect your database, it will become sad and filled with rage and then it will punish you by destroying your website’s speed. And then your visitors will disappear. And then you’ll be sad and give up on your website endeavors. Then your finances will fall into ruin and you’ll become depressed and get addicted to Zoloft.

Database optimization in WordPress takes very little effort if you use the plugin Optimize Database After Deleting Revisions. Adjust your settings, set the plugin to run on a schedule and forget it.

And then your database will be happy and your website will be fast and you’ll get lots of visitors and conversions and you’ll become insanely rich and buy an 80-foot yacht and a 47-room mansion on the shores of Costa Rica.

Need Any Help With Your WordPress Website?

Keep in mind that you won’t find any popups, ads or marketing ploys on this website because such things really suck. You will find useful tutorials, actionable advice and free support for your WordPress website.

Sorry, but I won’t build your website for you (so please don’t ask), but I do offer a few things things for free, especially for those who purchase their web hosting from Inmotion Hosting using this link.

4 Comments


  1. Good article, Eric. Makes sense that this would sort of be like defragging is to your hard drive, I suppose. I just downloaded the plug-in to try it out. I’m trying to learn WordPress (among a few other web development tools) on my desktop before going online. Thanks for sharing!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *