Delete unneeded items like revisions and spam comments for an optimized database.

Over time your WordPress database starts to collect a lot of unnecessary files like revisions, auto drafts, deleted posts, orphaned & duplicated data, spam comments, and more.

All of these just take up space in your database, and by regularly cleaning them out you can improve your website’s performance.

How to clean your WordPress database

There are several ways you can do this, but the easiest is with the free plugin WP-Sweep which can be found in the WordPress repository.

After you download, install, and activate the WP-Sweep plugin, from your dashboard navigate to “Tools” > “Sweep”.

The plugin will show you all the different bits of data you can clean up with a blue button labeled “Sweep”.

WP-Sweep Dashboard
WP-Sweep Dashboard

You can sweep these up one at a time, or scroll to the very bottom and hit Sweep All.

Be careful as you clean up files, some of the options will delete any posts or pages you have set to “Draft”.