How to Clean up WordPress Database

With use, the WordPress database becomes cluttered. Therefore, it is recommended that you regularly clean it up to optimize space. With optimized database space, you can have faster backups and smaller files. So, how do you clean up your WordPress database?

Backup Your WordPress Website

Changes made to your database cannot be reversed after the cleanup process. Therefore, you must first backup your site. It does not mean that your website will be wiped off when you clean the database. Backing up is more of a proactive step to avoid any eventualities.

There are many plugins that you can explore to backup your site but for this guide, we will look at how to back up with the most popular free WordPress backup plugin, UpdraftPlus.

UpdraftPlus has over two million users. It allows you to create a full backup of your WordPress website, which you can download on your computer or save on the cloud.

Step-by-step Guide on How to Backup your WordPress Website

Step 1: From your WordPress admin page, click on “Plugins” and then “Add new”. Type UpdraftPlus in the search box and click “Install Now”.


Step 2: After the installation, click “Activate” to start using the plugin.

Step 3: Navigate to UpdraftPlus Settings and click on “UpdraftPlus Backups” to configure the plugin.


Step 4: Click the Settings tab. Select a backup schedule for your files, including WordPress plugins, themes, images, and others. Next, select a backup schedule for your database backup. Next, select where to store the backup files. It is recommended that you choose a remote cloud storage service, like Dropbox for this.


Step 5: If you have selected Dropbox, you have to give UpdraftPlus access to your Dropbox. Therefore, scroll down and click the link in front of the “Authenticate with Dropbox” option. This will take you to the Dropbox site where you have to sign in with your Dropbox credential.


Step 6: Click “Allow” to continue.


Step 7: Click “Complete Setup” to finish the setup. You will be redirected to your WordPress website where you can see the UpdraftPlus settings page.

complete setup

Step 8: Scroll to the bottom of the page to click “Save Changes”. You have successfully set up a backup schedule and location to store your site’s backups. The next step is to backup your site. The plugin automatically creates backups according to the setup schedule. However, you can also create the backups manually. To backup manually, continue with the process.

Step 9: Navigate to Settings and then UpdraftPlus Backups. Next, click “Backup Now”.

back up now

Step 10: Check the boxes and click “Backup now” to continue.

backup now 2

The process can take some minutes depending on the volume of data on your site.

Clean up your WordPress Database

Just like for backups, there are many plugins that you can use for cleaning up your WordPress database. This guide will focus on the most popular option in the market, WP-Optimize. So, how do you clean up your WordPress database with WP-Optimize?

Step-by-step Guide on How to clean up your WordPress Database

Step 1: Navigate to “Plugins” again from your WordPress admin and click “Add new”. Step 2: Type in “WP-Optimize in the search box and click “Install now” next to the plugin. Step 3: Click “Activate Plugin” to activate the plugin. Step 4: Go to Menu and then “Setting” and then “WP-Optimize”. Step 5: Select items you want to remove from your WordPress database and click “Run all Selected Optimization”.


Step 6: Next, click on the Tables tab to review your database tables. You will see some items with “not installed” with a “Remove” button in front of them. These are leftover tables from old plugins that are not installed on your WordPress website. If you do not wish to use these plugins again, click “Remove” in front of each of them to remove them.


Schedule Automatic WordPress Database Cleanups

The more you use your WordPress website, the more database size will be eaten up by unnecessary files and data. Therefore, it is recommended that you schedule an automatic database cleanup. You can schedule the cleanup once a week. However, if you have a big site with many plugins, it may be a good idea to do it more often. To schedule an automatic WordPress database cleanup, follow the steps below:

Step 1: Navigate to WP-Optimize and click “Settings” Step 2: Select the scheduled type, which is weekly, by default. Click the dropdown arrow to change the schedule. Next, check the boxes based on what you want and close the page.

clean up

With this, you can have regular cleanups of your WordPress database.


We have looked at how you can clean up your WordPress database to ensure you have an optimized database. Remember to first backup data on your website before you go ahead with the cleanup process.

Leave a Reply

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