Learning Hub · Intermediate · 30 minutes
How to Clean Up the WordPress Database
Shrink years of accumulated cruft into a faster database — a practical, no-jargon walkthrough with the classic mistake flagged before you make it.
The short answer
Goal: shrink years of accumulated cruft into a faster database. Time needed: 30 minutes. Difficulty: intermediate.
The walkthrough below covers each step, the mistake most people make, and the shortcut worth knowing. On HostingAlly plans, several of the steps are handled for you — we note where.
Intermediate
Skill level
5
Steps to done
Free
Support included
Tested
On our platform
This guide assumes no prior expertise — just a hosting account, a browser, and 30 minutes of attention. Every instruction works on our platform exactly as written, and translates to any standard cPanel host.
One promise before starting: nothing in this guide is irreversible. Where a step could bite, we say so and give the undo.
The shape of the job
Start to finish, you'll back up before touching, purge the revision mountains, empty the expired transients, clear spam and orphans and cap future revisions.
None of the stages requires code or a terminal unless the guide explicitly says so — and where it does, the exact commands are given. The full step-by-step sits below; the surrounding sections cover the context that makes it stick.
The mistake almost everyone makes
Running 'optimise everything' plugins on autopilot against a store — some aggressive cleanups treat WooCommerce sessions and pending orders as cruft; read what each option deletes before ticking it.
Forewarned is genuinely forearmed here — this exact mistake accounts for most of the frustration this topic produces, and it's entirely avoidable once named.
The pro tip worth stealing
The wp_options table's autoloaded rows are the hidden performance tax — plugins leave settings marked autoload that WordPress then reads on every single page; auditing autoload size pays off disproportionately 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 workflow isn't.
What's automated here
We've automated the steps that don't deserve your time: certificates issue and renew themselves, the installer handles application setup, daily backups cover the what-if, and per-site settings live in a panel instead of config files. The guide above covers what's left — the part that's actually about your site.
And when a step misbehaves anyway, support answers around the clock — with the actual fix, not a knowledge-base link and a shrug. Half our best guides started as patterns in the tickets.

The platform this guide assumes
Every walkthrough in our Learning Hub is tested on the platform we actually run — cPanel, LiteSpeed, NVMe, one-click installs — so instructions match your screen instead of gesturing at it.
Our team migrates existing sites free of charge, typically within 24 hours and with zero downtime.
- Step-by-step, tested as written
- The gotcha flagged before you hit it
- Automation covers the boring steps
- 24/7 support if you get stuck
Why HostingAlly
What you get with every plan
Automation where it belongs
SSL, backups and installs run themselves here — the guide covers only what's genuinely yours to do.
The undo is always named
Where a step could bite, the guide says so and gives the reversal.
Help on standby
Stuck at step three at midnight? Support answers around the clock, mid-guide included.
Written from real tickets
Our guides come from the support desk — the gotchas are the ones people actually hit.
No jargon tax
Terms are explained in place or linked to the glossary — nothing assumes you already know.
Works as written
Every step tested on our own platform — no 'your host may vary' hand-waving.
Getting Started
How to get going
- 1
Back up before touching
Database cleanup is deletion by definition — snapshot first, because 'optimise' with no undo is how heirlooms get binned.
- 2
Purge the revision mountains
Every edit saves a revision forever by default — a cleanup plugin (or WP-CLI) clears thousands of them, often the single largest reclaim.
- 3
Empty the expired transients
Plugins cache data as transients that should expire but often linger — clearing them is safe and frequently dramatic on old sites.
- 4
Clear spam and orphans
Spam comments, trashed posts, orphaned metadata from deleted plugins — the sediment of years, all safely removable.
- 5
Cap future revisions
Define WP_POST_REVISIONS as a small number in wp-config.php — cleanup becomes maintenance instead of archaeology.
Included
What's covered on our plans
- No setup fees, ever
- Renewal prices that match signup prices
- 99.9% uptime commitment, monitored around the clock
- cPanel — the industry-standard control panel
- DDoS protection at the network level
- Per-site PHP version selection
- SSH, Git and Composer access on developer-friendly plans
- Free domain for the first year on annual plans
- Free SSL certificate on every plan, renewed automatically
- One-click installer for WordPress and 400+ apps
FAQ
Your questions, answered
Does database size really affect speed?
Size alone mildly; bloat in hot paths sharply — oversized autoloaded options and transient pileups slow every request, while a million clean revisions mostly just fatten backups. Target the hot paths first.
How often should the database be cleaned?
Quarterly for active sites, with revision caps making each pass smaller. One deep clean, then light maintenance — the first cleanup on a five-year site is an event; the rest are routine.
What does your 24/7 support actually cover?
Real people at every hour, and a scope that includes the practical questions — email setup, DNS, WordPress issues, restores — not just 'the server is up, ticket closed'. Pre-sales questions are welcome too; ask us something difficult and judge the reply.
Are backups included, and can I restore them myself?
Daily automatic backups are standard, restorable from the panel in minutes — files, databases or both, at 3am without a ticket if that's when you need it. For extra cover, you're welcome to run your own offsite copies alongside.
Where is your company based?
HostingAlly is a trading name of Bohzo Ltd, a company registered in England and Wales — a real, verifiable business with published terms under English law, which is worth checking about any host before you hand them your domain.
Is there a money-back guarantee?
Yes — try the hosting properly and if it doesn't fit, the refund process is a request, not a retention gauntlet. Domain registrations are the one standard carve-out, since registries make those non-refundable the moment they're placed.
Can I host more than one website on a plan?
On the Pro tier and above, yes — multiple sites with their own domains, email and SSL under one account. If the extra sites belong to clients rather than you, reseller hosting gives each one proper isolation instead.
Keep exploring
How to Install WordPress
A working WordPress site on your domain in ten minutes — beginner level, 10 minutes.
How to Choose a WordPress Theme
Pick a theme you'll still be glad about in two years — beginner level, an evening of evaluation.
WordPress Hosting
Managed WordPress with LiteSpeed caching, staging and automatic backups.
VPS Hosting
KVM virtual servers with root access, DDoS protection and flat pricing.
Put an ally behind your website.
Fast NVMe hosting, free SSL and migration, and real people on support around the clock — at prices that stay put.
See Hosting Plans