The WordPress database can get cluttered and will occasionally need a good cleaning to improve speed and efficiency. There are plenty of plugins that will clean and optimize the database, but this article will take a look at the Advanced Database Cleaner plugin. I’ve recently been using it and have been impressed with both the interface and the results. This article will review the plugin and show you how to clean and optimize your WordPress database.
What Are the Benefits of Optimizing Your WordPress Database?
So what are the benefits of keeping your database optimized? Over time your WordPress database will grow in size as you install new plugins or publish new posts and pages. The size of the WordPress database will affect the performance of your website as it will take longer to retrieve information from the database tables. Advanced Database Cleaner will optimize your database by reclaiming unused data and help you determine which data to remove.
Advanced Database Cleaner
The plugin advertises a way to “clean up your database as it may be full of garbage that makes your site sluggish and bloated.” It is offered as a free plugin (see below) that comes with an assortment of tools that allow you to perform the optimization and cleaning. Please note that some of the tools require a purchase to unlock the pro features. This article evaluates the pro version of Advanced Database Cleaner.
Download Advanced Database Cleaner (free)
The plugin functionality is divided into 6 tabs:
- General Clean-up
- Scheduled tasks
- Overview & Settings
Let’s take a look at each one.
1. General Clean-up
The general clean-up tab will let you choose which elements to clean:
- Auto Drafts
- Trash posts
- Pending Comments
- Spam Comments
- Trash Comments
- Orphan Postmeta
- Orphan Commentmeta
- Orphan Relationships
- Dashboard Transient Feed
You can view each element before performing the cleaning. For example, you can click the “View” icon for the revision element to see the revision ID, revision title, and revision date for a post, page, or custom post-type.
TIP: Be careful when deleting database tables and make sure you backup your database beforehand.
The database will become fragmented over time. Optimizing your database will reclaim lost space and defragment the data file, which will improve performance. Usually, you’ll want to optimize the database after you have deleted a large part of a table or have made significant changes to a table.
As well as being able to run the optimization manually, Advanced Database Cleaner allows you to schedule it for hourly, twice a day, daily, weekly, or monthly. This runs as a WordPress cron job.
This tab will show you the tables in your WordPress database. If you click the “Detect orphan tables” button, the plugin will scan the database and assign an owner to each table. This is a useful feature to help you locate orphan tables that do not belong to the WordPress core, the theme, or any currently installed plugins.
Because of the nature of how plugins work, when you uninstall a plugin, usually, the data will remain in the database. This is by design because if you accidentally deactivated or uninstalled a plugin, you would have to input all of the plugin data back into your website. Some plugins feature an option to remove the data from the database during the uninstall process, but not every plugin does this.
Once you have determined the tables you want to remove and have checked the box next to each one, you can choose the “Delete” option from the drop-down and then click on “Apply” button. This will remove the selected tables from your database.
The Options tab gives you direct access to the wp_options table in the database. The data stored in this table are the options that are set under the Administration > Settings panel (for example).
You can click the “Detect orphan options” button to determine what belongs to each option name. The owner of the option could be WordPress, a theme, or a plugin. If you see a percentage next to the owner name, it means Advanced Database Cleaner is unsure who the owner really is and has made an estimation.
Once you have determined which options to remove and have checked the box next to each one, you can choose “Delete” from the drop-down and then click on “Apply”. This will remove the options from the table.
5. Scheduled tasks
This is another nice tool included with the plugin. The Scheduled Tasks tab allows you to see all of the WordPress cron jobs and each individual schedule. Once you click “Detect orphan tasks” you will be able to determine if any orphan tasks are running.
6. Overview & Settings
This tab will give you an overview of your WordPress system and your database. From here you can turn on/off the plugin on the admin menu, disable the Welcome Message, and disable the Tables Clean-up Warning message.
Overall the plugin interface is easy to use and is well thought out by the author. The scheduled optimization tool is a great feature to keep a busy website and WordPress database clean and optimized, and cleaning orphaned data is a must for any website owner that has installed multiple themes and plugins over the years.
The pro version of the plugin costs $15 which is reasonable considering what similar plugins cost on CodeCanyon and elsewhere. Visit the author’s website if you would like to purchase Advanced Database Cleaner.
If you need help cleaning and optimizing your database you can call us directly at 602-633-4758 to get started. We will be able to assist you at an hourly rate through our WordPress Maintenance Service.