Over time your database collects clutter — revisions, spam, transients, and orphan data — that slows down every page load. Regular cleanup keeps things fast.
1. Limit post revisions
Revisions accumulate quickly. Cap how many are kept per post so your editor stays fast and your database stays lean.
2. Clean up spam & trashed items
Empty trash and delete spam comments regularly — they take up space and add unnecessary rows to your tables.
3. Remove expired transients
Transients are cached options that expire. Expired ones can linger, so clear them to avoid a bloated options table.
4. Optimize your tables
Running an optimize operation rebuilds fragmented tables, which improves query speed — especially worthwhile after large cleanups.
5. Schedule maintenance
Set up a monthly schedule so cleanup happens automatically before problems build up, rather than after your site slows down.
The result
A regular cleanup routine can cut query times noticeably and keep your site fast as it grows — without changing a line of front-end code.
