Post Revisions Quietly Triple Your Table Size
I remember being woken up at 3:00 AM three years ago by a server alert that felt like a physical punch to the gut. I spent two hours digging through logs, thinking I was under a sophisticated DDoS attack, only to find that the site had choked on its own weight. It wasn’t a hacker; it was just a massive, bloated table of post revisions and expired transients that had turned the MySQL engine into a snail. Most people think they need a more expensive VPS or a “magic” caching plugin to fix a sluggish site, but the truth is that database optimisation for wordpress is usually just about cleaning up the digital trash you’ve let pile up in your own backyard.
I’m not here to sell you a premium subscription to some bloated “all-in-one” optimization suite that promises miracles. I’ve spent enough time in the trenches of small hosting setups to know that real performance comes from understanding what is actually happening under the hood. In this guide, I’m going to show you the practical, manual steps to trim the fat from your tables and keep your queries lean. We are going to focus on the boring, essential maintenance that actually keeps a site stable and responsive.
Cleaning Up Post Revisions Before They Bury Your Performance

Every time you hit “Save Draft” or update a page, WordPress isn’t just saving the current version; it’s archiving the old one. If you’ve been running a content-heavy site for a few years, you likely have hundreds, if not thousands, of these ghost versions sitting in your tables. Cleaning up post revisions isn’t just about tidying up; it’s about preventing your database from swelling with useless data that serves no purpose other than to slow down your queries.
When your `wp_posts` table gets bloated with these redundant entries, every single search or content retrieval becomes heavier. It’s a silent killer. You might notice your dashboard lagging or your site taking an extra second to load a simple post. I’ve seen sites where the actual content makes up less than 10% of the table size, while the rest is just a graveyard of old edits. If you want to reduce mysql database size wordpress without moving to a bigger server, start by purging these revisions. It’s one of the easiest ways to get some breathing room back.
Managing WordPress Transients That Act Like Digital Clutter

Then there are transients. If post revisions are the clutter in your drawers, transients are the junk mail piling up in your entryway. WordPress uses these temporary pieces of data to store cached information from API calls or complex calculations so it doesn’t have to run the same heavy process every time a page loads. In theory, they are great. In practice, if a plugin is poorly coded or a process fails to expire them, they just sit there, bloating your `wp_options` table indefinitely.
I’ve seen plenty of clients call me because their site feels sluggish, only to find their database is carrying thousands of expired transient rows. It’s a silent killer. You aren’t just looking at more data; you’re looking at slower lookups every time the system tries to find actual settings. While managing wordpress transients is part of a healthy routine, don’t just delete them blindly. Use reliable wordpress database maintenance tools to clear out the expired ones specifically. It’s a simple way to reduce mysql database size wordpress without touching your actual content, and it keeps the engine running lean.
Five ways to stop your database from choking
- Kill the orphaned metadata. When you delete a plugin, it often leaves behind a trail of metadata in your wp_postmeta table. It’s dead weight that your server still has to scan every time it runs a query.
- Clean up your comment spam and trashed comments. If you aren’t actively moderating, your database is likely bloated with thousands of rows of useless junk that do nothing but slow down your comment queries.
- Stop the growth of your autoloaded options. Check your wp_options table for rows where ‘autoload’ is set to ‘yes’. If you have massive amounts of data being loaded on every single page hit, your site’s TTFB (Time to First Byte) will tank.
- Optimize your tables after a big cleanup. Deleting rows doesn’t actually shrink the file size on the disk; it just leaves “holes” in the data. You need to run an ‘OPTIMIZE TABLE’ command to actually reclaim that space and defragment the index.
- Don’t ignore the overhead in your tables. Use a tool to look for tables with high overhead; it’s usually a sign that your database is struggling to manage its own structure and needs a proper maintenance pass.
The bottom line on database maintenance
Stop treating your database like a junk drawer; if you don’t proactively prune old revisions and transients, they will eventually choke your site’s performance.
Optimization isn’t a “set and forget” task, but a regular maintenance habit that prevents the kind of bloat that leads to sluggish queries and site crashes.
Focus on the boring stuff—cleaning out the clutter—because a lean database is far more reliable than one stuffed with years of digital garbage you don’t need.
Stop Waiting for the Crash

Look, we’ve covered the essentials here: cleaning out those endless post revisions, clearing the transient junk, and keeping your tables lean. It isn’t rocket science, but it is necessary maintenance. If you leave your database to rot, you aren’t just slowing down your page loads; you are actively increasing the risk of a total database corruption during your next migration or update. A bloated database makes every single query take longer than it should, and in my experience, that’s exactly how you end up with a site that feels “heavy” and unresponsive. Don’t wait for a slow site to become a dead site before you decide to tidy up the digital mess you’ve allowed to accumulate.
At the end of the day, hosting is about stability, not just uptime. You can have the fastest NVMe drives in the world, but they won’t save you from a disorganized, inefficient backend. I keep a notebook of every outage I’ve ever dealt with, and I can tell you right now: half of them could have been avoided if someone had just run a basic optimization routine a month earlier. Treat your database like your server’s foundation. Keep it clean, keep it light, and stop treating maintenance like an optional luxury. Do the boring work now, so you aren’t the one getting paged at 3:00 AM when things finally break.
Frequently Asked Questions
I've already cleaned up my revisions and transients, but how do I know if my database tables are actually fragmented?
You can’t just guess; you have to look at the overhead. If you have access to phpMyAdmin, run a query to check the “Data Free” column in your tables. That’s your fragmentation. It’s basically empty space sitting inside your tables that the database can’t use efficiently because of all the deletions you just did. If that number is significant, it’s time to run an `OPTIMIZE TABLE` command. Don’t let that wasted space sit there.
Is it actually safe to run an "Optimize Table" command through a plugin, or am I asking for a corrupted database?
Look, I’ve seen enough corrupted tables to know why you’re nervous. Running an “Optimize Table” command via a plugin isn’t inherently dangerous, but it isn’t magic either. It’s just a wrapper for a standard SQL command that defragments your data. If your hosting environment is stable and your database isn’t currently under heavy load, you’ll be fine. But do not—under any circumstances—hit that button without a fresh, tested backup sitting on your drive first.
At what point does a bloated database actually start affecting my page load speeds, or is it just a theoretical problem?
It’s not just theoretical. You’ll feel it when your admin dashboard starts lagging or your queries take longer than a second to return. A bloated database forces the server to scan through massive, junk-filled tables just to find one simple row of content. That extra overhead adds latency to every single page request. Once your database size starts scaling faster than your actual content, your site’s performance is officially taking the hit.