Technote

Performance optimization Practical

Series When traffic starts to grow Part 5 of 8

What happens as your database quietly grows

A database grows far faster than your content does — and most of what accumulates is by-product, not the writing you actually did.

You have written a hundred posts, and the database has grown far more than that would suggest. Backups take longer, the admin feels heavy, and moving the site starts to look like a project. Nothing strange is happening — most of what accumulates in a database is not the writing you did.

This is not a flaw in WordPress; it is the price of convenience. Undo history, temporary storage and logs all exist because they are useful. They simply keep accumulating when nobody tidies them.

What piles up

Four quiet growers — all of them by-products of normal behaviour

Revisions store a complete copy of the previous version on every save. Polish a long article a few dozen times and it carries a few dozen versions. Wonderful for undo, but a hundred posts at thirty versions each is effectively three thousand posts of storage.

Transients are data held “just for a while”. They carry an expiry time, but expiring does not delete them. What has expired and stayed behind becomes a substantial mass over the months.

Traces of removed plugins are just as common. Deleting a plugin frequently leaves its tables and settings in place. Well-built plugins clean up after themselves; not all of them do.

What actually gets worse

You usually feel it in this order. Backups take longer, then the admin screens get heavy, then migration and restore become daunting.

That last one matters most. A restore that takes a long time translates directly into lost hours during an incident. It is the kind of debt that costs nothing on ordinary days and everything on the worst one.

There is also a subtler effect: settings loaded on every single request grow, and every request slows a little. Negligible once, visible in aggregate.

The order of work — back up first

The order for cleanup — make the state reversible before deleting anything

Database cleanup is deletion, and deletions do not come back. Always back up files and database together before you start. Then work one category at a time, checking the site in between, so that if something breaks you know what caused it.

More important than the cleanup is stopping it recurring. Revisions can be limited to a fixed number per post, and the trash can be set to empty itself on a schedule. Clean once without changing the settings and you will be doing exactly the same job again in a few months.

More on databases and performance sits in the performance archive, and cleanup alongside caching and server configuration is part of our optimization program.

Next part

If doing all that deleting on the live site made you uneasy, that instinct is correct. The next part is about the point at which you need a staging site.

More on this topic

All technotes

Performance optimization Practical

Who pays for the milliseconds a tag adds?

A tracking script does not stop at downloading. While it is parsed and executed the main thread is busy, and a busy page ignores fingers. That cost is…

Marketers 5 min read

Performance optimization Practical

The object cache: what Redis actually removes

Repeated identical lookups disappear. One slow query does not. Miss that distinction and you will wire up Redis and then ask why nothing got faster.

Developers 7 min read

Performance optimization Practical

This is how a landing page gets heavy

Nobody decides to make a landing page heavy. It accumulates: one addition per campaign, and nothing ever removed when the campaign ends.

Marketers 6 min read

₩270,000 · Join the program