Before you read another word you should make a backup of your database.
Occasionally they come up How to make a backup of this. In the last one I had to optimize a blog that had accumulated junk for more than a decade.
Before going into the details of the dump that had become the site to optimize, I take the opportunity to review one of what I think is one of the best tools that facilitate the tedious task of cleaning up a database full of shit. That is one of the many reasons why a blog rules slow and consumes too many server resources.
There are many plugins that clean and optimize the database, but none of them reach the corners where you can put “Advanced Database Cleaner Pro“. While many of the “automatic” actions can be done by hand, it saves you a lot of time.
This comparison table, published by its creators, shows its virtues compared to some similar plugins of the competition
Advanced Database Cleaner Pro, with a lot of options
I think I’ve tried almost all of the free ones, from the popular “Wp Optimize“to the rather neglected“Plugins Garbage Collector, Database Cleanup“(beware, it hasn’t been updated for eight months) and they meet the minimum requirements, but they remain on the surface.
For this post we have used the paid version because, even though it has a very decent free version very decent, the real advantages is in the extra options of its Pro version.
There are several reasons why it’s worth the $39
It’s not an annual subscription fee that you have to renew to receive updates like most premium plugins You only pay once and it includes support and all future updates.
The cheapest version allows you to use it on two WordPress installations, ideal for use on the client site, clean and uninstall.
As it’s a plugin that you don’t need to have activated (unless you want to set it up for scheduled optimisations) you can deactivate and/or uninstall it and use it when it’s time to clean up again.
The plugin lives up to its role by leading by example, it deletes any data used to store its configuration once uninstalled and leaves no trace.
After downloading and installing it, we are greeted by a distraction-free interface with six tabs and an option to schedule optimisation tasks. Activate the licence and get to work.
The general cleanup is as usual for most free plugins. We can see and clean up post revisions, drafts, comments, pingbacks and trackbacks and the usual orphaned data. Everything can be seen in a list by clicking on that eye symbol, which helps a lot.
There is not much else to note here. In these basic actions there is no danger of deleting anything sensitive or vital to the overall functioning of the site. Still, it goes without saying that making a copy of the database before proceeding is always the best thing to do. You never know.
The“Keep last” option allows us to set the amount of last data, such as drafts, that we want to keep after cleaning. To delete this set amount, just leave the space blank or add 0 (zero) and save again.
Repair and optimize tables
Go to the tab “Tables” and first of all click on“Scan tables“. The plugin will scan all the tables and categorize them so that we have an approximation of whether they belong to a plugin, a template or WordPress
And I say approximation because this categorisation process will add a percentage to the category when it doesn’t find a possible total match with the supposed origin.
Once the tables have been checked we move on to optimising them. It wouldn’t hurt to make and download a backup copy of the database.
Don’t think I’m too much insistent with this backup, the plugin will remind you each and every time you are going to clean (delete) something with this big popup.
The idea now is that, taking into account the name of the string and the matching hint that the plugin offers, we can identify if those processes belong to plugins or templates that we have already deleted and are fattening the database and, what is worse, loading again and again.
If you have installed and uninstalled many plugins and templates for a long time without cleaning the database (as is the case of the blog I had to optimise) the amount of orphaned data can be scandalous.
And you’ll start to discover that in the “Options” tab
As in Tables, we press the “Scan options” button and wait for the plugin to categorize everything.
Specifically here appeared 1388 orphaned data (Corresponds to the table wp_options), which together with the rest of useless junk gave the database a total weight of almost four gigabytes.
Most probably you won’t remember which plugin they belonged to, so before deleting anything, you’ll have to use the search engine to try to identify those strings.
The tool for filtering and being able to select strings by name once you are sure that they can be emilinated is appreciated. By the way, have you already backed up your database in case you break something?
You can also look up values in phpMyAdmin to try to find out how long the tables have not been written to and any other data that might jog your memory.
If you still can’t identify the orphaned data, it is advisable not to delete it, just in case. Maybe another time you will find a better clue. Although it must also be said that the plugin, at least in my case, hardly made any mistakes in the long list of “orphans” it presented.
Control Cron jobs
Let’s go to the cron jobs, or scheduled tasks, the plugin also identifies and categorizes them
Same thing, first click on “Scan tasks” and wait.
Yes, you can also have a jumble of tasks of processes of things that do not exist and yet they continue to run every day, even every hour, permanently suffocating your blog.
On the blog I mentioned there were 14 tasks sucking non-stop, even from plugins that had disappeared in 2008.
Of all of them, I finally left only one alive because it was checking for updates to an essential plugin.
In the last tab you can check the status of the database and configure where you want the plugin access to appear in the administration
After a few hours of surgical cleaning I was able to turn the almost 4 gigabytes of crap into 244 megabytes of brand new, crystal clear, necessary and optimised data.
So you know, you have no excuse. “Wash it, filthy,” which in this case shrinks, but that’s what it’s all about.
Depending on the volume of activity on your blog you can repeat this process from time to time to keep the database light and schedule the basic cleaning so you only have to give it a quick once-over in case some dirt accumulates.
As usual, please note that some of the links contained in this text are affiliate links. If you would like to buy this plugin from any of them you will have my eternal thanks.