How-to · Intermediate · 30 minutes
How to Clean Up the WordPress Database
Clear out years of accumulated junk and leave a database that answers faster — a practical, jargon-free walkthrough with the classic mistake flagged before you make it.
Straight answer first
The job: clear out years of accumulated junk and leave a database that answers faster. Time to allow: 30 minutes. Skill needed: intermediate.
The walkthrough below covers every step, the mistake most people make, and the shortcut worth keeping. On Hosting Seller plans several of these steps are already done for you, and we say where.
Written by the Hosting Seller staff · Checked 1 August 2026
Intermediate
Skill needed
5
Stages to finish
Free
Help included
Tested
On our own kit
This guide assumes no expertise at all — just a hosting account, a browser and 30 minutes of attention. Every instruction works on our platform exactly as written, and carries over to any standard cPanel host.
One promise before you start: nothing in this guide is irreversible. Where a step could bite, we say so and give you the undo.
The shape of the work
From start to finish, you will back up before you delete, clear out the mountain of revisions, drop the stale transient rows, sweep the rest of the sediment and cap revisions going forward.
No stage needs code or a terminal unless the guide says so outright, and where it does, the exact commands are printed. The full step-by-step sits below; the sections around it give the context that makes it stick.
The mistake nearly everyone makes
Letting an optimise-everything plugin loose on a shop. Some of the more aggressive cleanups treat WooCommerce sessions and pending orders as rubbish. Read what each option actually removes before you tick it.
Forewarned really is forearmed here. This one mistake accounts for most of the frustration the subject produces, and it is entirely avoidable once somebody names it.
The trick worth borrowing
The autoloaded rows in wp_options are the hidden tax nobody looks at. Plugins leave settings marked autoload, so WordPress reads them on every single page load. Auditing the size of that autoload pays off out of all proportion on old sites.
Small habits like this are the real difference between people who find hosting easy and people who find it stressful. The tools are identical; the working method is not.
What runs by itself here
We have automated the steps that do not deserve your time: certificates issue and reissue themselves, the installer handles application setup, the daily backup covers the what-if, and per-site settings live in a panel instead of a config file. The guide above covers what remains — the part that is actually about your site.
And when a step misbehaves anyway, support answers at any hour with the actual fix, not a knowledge-base link and a shrug. Half our best guides began life as a pattern in the ticket queue.

The hosting this guide is written against
Every walkthrough on our how-to shelf is tested on the platform we actually run — cPanel, LiteSpeed, NVMe, one-click installs — so the instructions match your screen instead of gesturing vaguely at it.
Bring an existing site and we shift it across at no charge — usually inside 24 hours, with nothing going dark while we work.
- Step by step, tested exactly as printed
- The snag flagged before you reach it
- The dull steps are already automated
- People on hand at any hour if you stall
Why Hosting Seller
On every plan, as standard
No jargon toll
Terms are explained where they appear or linked to the glossary — nothing assumes you already know.
Automation where it belongs
SSL, backups and installs run themselves here, so the guide covers only what is genuinely yours to do.
The snag, named early
The classic mistake for this exact job is flagged before step one, so 30 minutes stays 30 minutes.
Works exactly as written
Every step tested on the platform we run — no 'your host may differ' hand-waving anywhere.
Scoped honestly
Clear out years of accumulated junk and leave a database that answers faster is a intermediate-level task — this guide budgets 30 minutes and says which steps the platform absorbs.
5 steps, no filler
Each stage is a few minutes of steady clicking, with the fiddly parts marked as fiddly.
First Steps
From choosing to live
- 1
Back up before you delete
Cleaning a database means deleting rows, whatever the button says. Take a snapshot first, because an optimise run with no way back is how something irreplaceable ends up in the bin.
- 2
Clear out the mountain of revisions
By default every edit you ever made is stored forever. A cleanup plugin or a WP-CLI command clears thousands of them at once, and on an old site this is usually the single biggest reclaim available.
- 3
Drop the stale transient rows
Plugins cache things as transients that are supposed to expire and frequently do not. Clearing them is safe, quick, and on a long-running site the result can be startling.
- 4
Sweep the rest of the sediment
Spam comments, posts sat in the trash, orphaned metadata left behind by plugins you removed years ago. None of it is doing anything, and all of it can go.
- 5
Cap revisions going forward
Set WP_POST_REVISIONS to a small number in wp-config.php. Do that and the next cleanup is routine maintenance rather than an archaeological dig through five years of edits.
In the Box
Packed with every plan
- WebP image optimisation built in and costing nothing
- Nothing added at setup — no joining fee, ever
- DDoS filtering handled out at the network edge
- A 30-day money-back guarantee on every hosting plan
- Upgrades apply to the account in place, with no move between plans
- The Softaculous installer for one-click application setup
- Spam and virus filtering fitted to every mailbox
- Webmail in the browser plus IMAP, POP and SMTP for your own client
- A free SSL certificate on every plan, reissued before it lapses
- cPanel, the panel the rest of the trade already knows
Across the Counter
The questions we get asked most
Does the size of the database really slow a site down?
Size on its own, only mildly. Bloat in the hot paths, sharply. Oversized autoloaded options and piles of stale transients slow every request, while a million tidy revisions mostly just make your backups fatter. Go after the hot paths first.
How often does the database actually need cleaning?
Quarterly on a busy site, and each pass gets smaller once revisions are capped. One thorough clean followed by light maintenance is the pattern. The first cleanup on a five-year-old site is an event; every one after it is a chore.
What if the site outgrows the plan I bought?
You move up in place. Plan changes are made from the client area with no migration and no downtime, and the range runs from small shared accounts through VPS to whole dedicated servers. Growing becomes a line change on your account rather than a hunt for a new host.
Does hosting come with mailboxes?
It does — mailboxes on your own domain ship with every hosting plan, with webmail, IMAP, POP and SMTP access and spam filtering fitted as standard. There is also standalone email hosting for domains whose website lives somewhere else entirely.
What uptime do you commit to, and who is watching?
We commit to 99.9% uptime and watch it continuously. That figure is an operational target rather than a poster line, and the alerting behind it usually has an engineer on a problem before the first customer notices anything is wrong.
Where do the servers actually sit?
Our hosting runs from European datacentres with London at the centre, behind server-level caching that keeps cached pages quick for visitors anywhere. For most sites the build of the platform — NVMe disks, LiteSpeed, sensible numbers of accounts per machine — decides the speed far more than the postcode does.
Can I set the PHP version myself?
Yes — PHP versions are chosen per site from the control panel, so an old application and a current one can sit side by side on the same account. Extensions and per-site settings live in the same screen, and none of it needs a support ticket.
Read next
How to Install WordPress
Get a working WordPress site answering on your domain inside ten minutes — beginner level, about 10 minutes.
How to Stop Your Email Going to Spam
Work out why your mail is being filtered and repair its reputation properly — intermediate level, about an afternoon.
Domain Names
Search, register and transfer names — year one free with annual hosting.
WordPress Hosting
WordPress looked after for you — LiteSpeed caching, staging copies and daily backups.
Packing up and moving host? Take our checklist.
A plain running order for a move nobody notices: what to copy first, how to carry email across without dropping a single message, when to point DNS, and the two slips behind nearly every hour of downtime we get called about.
Give your website a proper home.
Free SSL, a free move in, renewals charged at the order price, and human support around the clock. That is the whole offer.
See the plans