Wordpress Database Cleanup, Optimization and Backup Plugins

Page content

Wordpress Plugins to Clean, Repair, Optimize, Backup and Manage Database

Wordpress is an awesome content management system and has become the favorite of developers and non developers for several reasons including its flexibility, strong support, large community and ease of use. Made from php and mysql mainly, Wordpress requires a database to store all the information on your blog including posts, pages, plugin data, images and everything you upload to your wordpress installation such as themes.

The Wordpress database also stores the revisions that you make to your Wordpress posts. It is generally good to know about the tables included in a Wordpress MySQL database and their roles. The plugins that you add to your site also create individual tables inside the database that are required for their operation. If you want to login to your Wordpress database to take a look at the size of tables, you can easily check it out using the ‘phpmyadmin’.

Once you are logged into the wordpress database, you can see the tables listed there and more information about the tables including their size. Some tables like wp-posts and wp-options grow very large with time and optimizing these tables as well as clearing expired transients and revisions is also important to keep your Wordpress database in good condition.

Your Wordpress database has an important role in terms of site speed, which is critical for ranking higher. It is why webmasters should carry out regular maintenance of their database to prevent their site from loading slow. Maintaining the database and cleaning it may be difficult if done manually. It is why non-developers who are not familiar with the structure of the database and how it functions must use a database management plugin to maintain their Wordpress database.

One best thing about Wordpress is that there are reliable plugins to carry out nearly any task related to Wordpress. There are also some very good plugins that can help you maintain your database efficiently and keep your site in good condition.

In this post, we will discuss some database plugins that can be helpful to maintain, manage and clean up your Wordpress database. There are both free and premium plugins that include database maintenance features. For example, Wp-Rocket is a premium caching plugin that includes caching features to speed up your site as well as database maintenance features to clean and speed up your Wordpress database.

In case you want to completely reset your database, there is also a plugin that can help you do it. If you are tech savvy, you might not always need a plugin to clear expired transients from your Wordpress database or for doing a search and replace or even optimizing mysql or Mariadb tables. You can do it with the help of WP-CLI or Wordpress Command Line Interface, a command line tool for managing several Wordpress related tasks.

Let’s first take a look at the plugins that come in handy when it comes to managing your Wordpress database. One important thing that I would want to let you know before we discuss database management plugins is that whenever you are planning to maintain or clean your database, do not forget to download a backup that can be used if anything goes wrong. We will also discuss some database backup plugins that can be used to create a database backup.

Database cleanup and maintenance plugins:

WP Optimize (Plugin with caching, compressing and speed optimization as well as advanced database cleaning features)

WP Optimize is an excellent plugin that packs the features of multiple plugins into one. You can use it for caching and compression on your website and also to optimize your database.

The best thing about WP-Optimize is that it includes more database optimization features compared to any free plugin. You can clean up your database and check the status of individual tables in your wp-database as well as schedule regular maintenance using this plugin. The plugin also shows the size of individual tables, overhead and the size of the database.

However, if you want to optimize individual tables, you will need to buy the pro version of the plugin. If you have a small or medium sized blog, the free features might be sufficient to keep your database optimized and in good condition.

Another important thing about this plugin is that it can help you remove any tables left behind by uninstalled plugins.

Apart from optimizing database tables, the plugin allows you to clean up orphaned data, post revisions and transients. Overall, it is a very good plugin for database maintenance.

Advanced database cleaner (An advanced, easy to use and complete database optimization and cleaning solution

The advanced database cleaner is as the name suggests an advanced plugin for database cleanup and optimization. It is advanced in the sense that it provides some advanced options to clean up your database and improve speed. However, there are some crucial features which are available in the pro version only. If you want all those features to have an absolutely perfect database, you can go for pro and achieve max speed for your Wordpress blog.

Apart from cleaning revisions and auto drafts, the plugins allows you to delete transient and orphaned data including orphaned post meta, comment meta, user meta, term meta and relationships. These features are included in the general clean up section of the plugin.

The plugin has another section labeled tables where you get to optimize and repair tables as well as delete any tables that are not necessary. While you can optimize all tables without worry, you must not delete any tables without knowing what you are doing. So, proceed with caution and keep a backup ready.

The feature for detecting orphaned data in the tables is included in the pro version of the plugin. With the pro version of this plugin, you can also filter and search specific items. The pro version allows you to detect orphaned tables, orphaned options and cron tasks. A very good feature that this plugin has included in its free version is the feature to manage ‘autoloaded data’.

There is a lot of data being autoloaded inside the wp-options table. It includes data that is automatically loaded on all pages of your blog/website. However, you do not always need this data to be autoloaded. Some of these options are left behind the themes and plugins you have removed from your website but they have left their options behind. This data might still be autoloading in all pages.

If you have previously installed and uninstalled plugins or themes, they might have left behind options that are being autoloaded sitewide. For example, you tried a SEO plugin and later removed it and switched to another, then the older plugin would have left a lot of data behind that might be being autoloaded sitewide. The same applies to themes that have been removed.

If there is a lot of such data being autoloaded, it will slow down your website. However, you can set the autoload to no for the data that does not need to be loaded using the Advanced Database cleaner. If you want to know which plugin or theme the autoloaded data belongs to, you will need the pro version of the plugin.

It sometimes becomes difficult to recognize which autoloaded data belongs to a particular theme or plugin because of how developers might have named those options. In such a case, the pro version of this plugin can be quite useful. Still, those who want to carry out a deep and advanced cleaning of their database, must go for the pro version of this plugin.

WP Rocket (Premium Caching, Speed Optimization, CDN and database optimization plugin)

WP Rocker is claimed to be one of the best caching plugins for Wordpress. It is an easy to set up and yet advanced and very efficient premium Wordpress caching plugin.

The plugin includes a lot of features apart from caching and minimization as well as cdn and database optimization features. WP Rocket is not available in the Wordpress plugin repository and you will need to purchase a premium license and download the plugin from its website.

However, when it comes to regular database maintenance and optimization, WP Rocket has included some crucial features in its plugin.

As already mentioned, despite being an advanced plugin that offers several speed features, many of which are automatically applied when you install the plugin, WP Rocket and its features are easy to apply and use.

You can carry out regular database cleanup and maintenance with the help of WP Rocket with only a few clicks. Just go to the database section and check the boxes for features you want to apply. You can clean up comments, posts, and transients, optimize your database tables, or schedule automatic cleanups with the help of WP-Rocket.

You should use WP-Rocket when you want an ultimate caching plugin for managing website speed that includes additional features like preloading, lazy loading, cdn and database cleanup. It costs $59 to purchase a one year license for one website.

Perfmatters (Speed Optimization, Performance Management and Database Optimization Plugin for Wordpress)

Perfmatters is an excellent speed optimization plugin for Wordpress that also comes only in a premium version. However, it is a lightweight and a very useful plugin that includes a very large number of features.

You can use this plugin to remove or disable certain scripts that affect speed, change login url, applying cdn, preloading, lazyloading, prevent scripts from loading on each page, local analytics and fonts and for database optimization.

Perfmatters is a popular speed optimization plugin and serves several options including database cleanup and optimization.

To use the database optimization features included in Perfmatters, you will need to click on tools in the left sidebar of the plugin settings and then click on database. From here, you can clean up revisions, auto drafts, trashed posts, comments, expired transients or all transients and optimize tables.

You can enable only the features that you want cleaned. If you want to optimize the entire database at once, you can do so using Perfmatters. The plugin also allows you to schedule a regular database cleanup.

Optimize database after deleting revisions (Dedicated database cleanup and optimization plugin)

Optimize database after cleaning revisions

This is another excellent plugin for cleaning your database and optimizing tables. You will instantly feel a boost of speed after carrying out the optimizations using this plugin.

This is an easy to set up and use plugin.

Apart from cleaning the revisions for post types and custom post types, it allows you to clear oEmbed cache, clear orphans, clean transients, pingbacks and so on. You can optimize all the tables at once or select to exclude the tables you do not want optimized.

The plugin also allows you to schedule clean up of the database on a regular basis such as hourly, daily, weekly or monthly basis. It supports multisite installations and you can optimize all the databases as the network administrator.

All you need to do is to install the plugin from the Wordpress plugin repository and then check out the settings. Check the boxes for everything you want cleaned and optimized. In the case of tables, you can check the ones you want to exclude and then run the optimizer.

The plugin has received 4.8 ratings from 177 reviews and has more than 80,000 active installations.

Database Cleaner: Clean, Optimize and Repair (A plugin for deep cleaning your database with a friendly user interface)

Database cleaner is another feature rich database cleanup and optimization plugin that helps clean up tables, orphaned data, oEmbed caches as well do more to clean up and speed up the wordpress database.

Both novice and skilled users can use the plugin for database maintenance. The plugin author has created the plugin keeping in mind the needs of Wordpress users and you would find that the plugin includes several features that are generally available only in the paid versions of other database optimization plugins.

The database cleaner offers an autoclean feature that will automatically clean up the selected items for you. It offers both easy and expert modes. In the easy mode, you do not have much to do except select the desired tables that you would like to optimize and clean up.

However, you get more extensive options for cleaning up the database and optimization in the expert mode. To get better details regarding tables and options, you will need to activate the expert mode. In the expert mode, you can also check out the data that is being autoloaded sitewide and make changes. In this mode, you can also manage individual tables separately.

In the wordpress core section, where you get to clean the post revisions, spam comments, expired transients and orphaned data, just check the boxes for items to be cleaned and run autoclean. However, you have the option to either clean or only optimize and repair the tables in your database.

The intuitive user interface of Database Cleaner makes it very easy to clean up and maintain your database. The plugin has received 4.9 ratings in the wordpress plugin repository.

Database Backup and Management Plugins:

Database backup plugins come in handy if you want to backup your database before cleaning. However, it is also a good practice to regularly backup your database and Wordpress files so that you can restore if your website faces any issue or gets hacked. Here, we have listed some of the best backup and database management plugins.

WP-DBmanager (plugin to optimize, repair, backup and restore database)

The WP-DBmanager is a good plugin for optimizing and repairing your Wordpress database as well as for creating and restoring database backups. You can also delete the previous backups with this plugin as well as run select queries.

You can also schedule a backup as well as optimization of the database using this plugin. WP-DBmanager uses mysqldump application for backup creation and mysql application for restoration via shell. You can install the plugin from the wordpress plugin repository like you install any plugin and its settings will be visible in the sidebar. Click on Backup Db to create a backup

WP DBmanager

With more than 3 million active installations and 4.4 star ratings out of five from 7427 votes, Updraft Plus is the most popular backup and migration plugin in the Wordpress repository.

Available in both free and premium versions, it allows you to backup your database and the entire site.

You must regularly backup your site and the database to ensure that if anything wrong happens or your site gets hacked, you can always restore from the backup.

You can easily backup your website to your preferred location including but not limited to Dropbox, Google Drive, Amazon S3 (or compatible), Rackspace Cloud, FTP, and others. The premium version provides more options to save your backup to.

You can also schedule a backup with Updraft Plus.

Backup Migration (easy manual and automatic backups and migration)

The backup migration plugin is relatively new but a fantastic and efficient plugin for creating backups. It can create a backup within minutes for your site and save them to your server or you can download a backup to your local machine.

You can select which files and databases need to be backed up and which not. The plugin will only backup the selected files and databases in the form of a zip file.

Even if you need to migrate your website, just generate a backup and then install Wordpress on your new server and upload the backup using the same plugin. Within minutes, you will have your Wordpress site functioning on another server.

You can also schedule backups of databases and important Wordpress files with this plugin. The plugin is absolutely easy to use and includes some unique features like a url to easily migrate your website without having to move a backup.

Better Search Replace (Carry out search and replace in your database):

Better Search Replace Plugin

The Better search Replace plugin is an excellent plugin for making changes inside your database. It allows you to replace strings with new ones by running a search and replace.

However, before you carry out a search and replace, you can also carry out a dry run, which will allow you to check how many and what changes will be made. Once you have tested it, you can carry out the final search and replace.

You can install this plugin from the Wordpress plugin repository just like any other plugin and then you will find the options for this plugin listed in the tools section.

The Better Search Replace plugin proves to be useful if you are making changes to url or moving your website to a new domain or server. Suppose you are changing your domain name, you can replace the old links with new ones using this plugin.

Since chances of error always remain, you must take a backup before using this plugin. You can also omit tables like Guid when you are making changes to the database using this plugin.

The plugin also comes in a pro version which will let you check out the changes you have made and includes premium support. The pro version also allows you to backup and import the database.

Database Reset (Reset Wordpress database with only a few clicks)

In some cases, you may need to completely reset your database to avoid reinstalling Wordpress. It is very easy to do so with the database reset plugin that allows you to reset your entire database or only selected tables to default.

Once you reset the entire database, you will have a completely new Wordpress installation and you can start from scratch. Otherwise, you can reset specific tables in the database with the help of this plugin.

Again, it is advisable to check before resetting the database that you really want to do it. You might be able to restore only if you have created a backup.

The plugin is also used by the plugin and theme developers who need to clean the database of any junk. It works very fast and is quite secure to use.

WP Reset (Complete Wordpress reset with snapshots):

WP Reset

Both Database reset and WP Reset plugins are developed by the same plugin author. However, WP Reset includes more extensive features than the database reset plugin.

WP Reset comes in both free and premium versions.

It allows you to completely reset your website and leaves a few things like the media in the uploads folder, current user, core files and plugins as well as site title and other general settings untouched.

However, if you only want to reset the content like posts and pages, it is a pro feature. The pro version also allows you to select the type of content you want to be removed.

Another important feature of this plugin is the snapshots option that allows you to take snapshots before carrying out a reset. If anything goes wrong, you can restore from a snapshot. Automatic snapshots are available with the pro version.

The pro version also allows for options reset which includes the deletion of user roles, settings and options from plugins and themes as well as transients and widgets. If you carry out a nuclear reset with the pro version, it will delete nearly everything except the current user, general site settings and the database tables without the custom prefix wp_.

WP Reset can be useful in several situations and is especially very helpful for theme and plugin developers. However, other users may also need the plugin when they want to reset posts, users, comments etc.