Over time, the WordPress database accumulates data it no longer needs — old revisions, deleted posts that were never fully removed, expired temporary files, leftover plugin data from plugins you stopped using years ago. None of it is doing anything useful. All of it adds weight to a database that WordPress queries every time a page loads.

A database cleanup removes this unnecessary data, keeping the database lean and queries fast.

What to clean up

  • Post revisions — WordPress saves a new version every time you save a post or page. On mature sites, a single piece of content can have dozens of revisions that serve no current purpose
  • Trashed content — Posts, pages, and comments in the trash stay in the database until permanently deleted
  • Expired transients — Temporary data stored by plugins that accumulates and is rarely cleaned up automatically
  • Orphaned plugin data — Tables and settings left behind by plugins that have since been removed
  • Spam comments — If your site has comments enabled, spam builds up quickly and adds database bulk

How often should you clean up?

For most business sites, quarterly is sufficient. Sites with high publishing volume or heavy plugin usage may benefit from more frequent cleanup. It is not something to do daily — but it should be on the maintenance schedule rather than left indefinitely.

One important note

Always take a backup before running a database cleanup. Cleanup tools permanently delete data, and while what gets removed is typically safe to lose, a backup ensures you have a restore point if anything unexpected happens.

Database cleanup is part of our WordPress maintenance service. Read more about database optimisation or explore the maintenance knowledge base.