This tutorial will walk you through setting up the WordPress plugin Advanced Database Cleaner and show you how to clean and optimize your WordPress database.
Clean and Optimize Your WordPress Database
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 WordPress database optimized? Over time your 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.
Clean and Optimize Your WordPress Database With 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 clean and optimize the WordPress database. 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.
1. General Clean-up
The general clean-up tab will let you choose which WordPress database elements to clean:
- Auto Drafts
- Trashed Posts
- Pending Comments
- Spam Comments
- Trashed Comments
- Orphaned Post Meta
- Orphaned Comment Meta
- Orphaned User Meta
- Orphaned Term Meta
- Orphan Relationships
- Expired Transients
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 elements and make sure you backup your database beforehand. This precaution should be taken before you clean and optimize your WordPress database.
You can also create a cleanup schedule. This will run automatically and can be scheduled hourly, twice a day, daily, weekly, or monthly.
This tab will show you the tables in your WordPress database. If you click the “Scan 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 the “Apply” button. This will remove the selected tables from your database. Don’t forget to optimize the WordPress database after you remove the tables.
The database will become fragmented over time. Optimizing your WordPress database will reclaim lost space and defragment the data file. This will greatly improve performance. Usually, you’ll want to optimize the WordPress database after you have deleted a large part of a table or have made significant changes.
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.
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’ll see a “Belongs to” column to identify the owner of an option name. The owner could be WordPress, a theme, or a plugin. Clicking on the “Orphans” link will help you identify the options that may need to be deleted.
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. After that, don’t forget to optimize the WordPress database.
4. Cron Jobs
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 “Scan tasks” you will be able to determine if any orphan tasks are running.
5. 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 left menu and show the plugin menu under tools.
Final Thoughts: How to Clean and Optimize Your WordPress Database
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. Cleaning orphaned data is a must for any website owner that has installed multiple themes and plugins over the years. Overall, this plugin has proven to be a great tool to clean and optimize the WordPress database.
The pro version of the plugin has a reasonable cost 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 through our WordPress Maintenance Plans.