Skip to main content

Walkthrough · Intermediate · 20 minutes

How to Clean Up the WordPress Database

How to flush out years of accumulated clutter and leave a database that responds faster, without the guessing — the steps in order, the snag ahead of time, and the tip our support team repeats daily.

The short answer

The job: flush out years of accumulated clutter and leave a database that responds faster. Time to set aside: 20 minutes. Skill needed: intermediate.

Below is the full run of steps, the error most people trip over, and the short cut worth remembering. On Hosting & Domains plans several steps are already automated away — the guide marks each one.

By the Hosting & Domains team · Reviewed 18 August 2026

Intermediate

Experience required

5

Stages, start to finish

Free

Support included

Proven

On the platform itself

No prior knowledge assumed — a hosting account, a browser and 20 minutes of attention is the whole entry requirement. Every instruction runs on our platform exactly as printed, and carries over to any standard cPanel host.

A promise before step one: nothing here is a one-way door. Any step with teeth is flagged, and the way back is printed beside it.

How the work divides up

Over the whole job, you will back up before you delete anything, purge the revision mountain, clear out expired transients, sweep up the leftovers and cap revisions from now on.

No part of this needs code or a terminal unless the guide says so plainly — and where it does, the exact commands are printed. The step-by-step is below, with the surrounding sections supplying the context that makes it hold.

The error nearly everyone hits

Turning an optimise-everything plugin loose on a shop. The more aggressive options treat WooCommerce sessions and pending orders as rubbish. Read exactly what each checkbox removes before you tick it.

Forewarned is genuinely forearmed here. This one mistake accounts for most of the frustration the topic ever causes — and it disappears entirely once somebody points it out.

A habit worth borrowing

Nobody ever audits the autoloaded rows in wp_options, and they are a tax all the same. Plugins leave settings marked autoload, and WordPress reads every one on every page load. Checking the autoload total repays out of all proportion on older sites.

Habits this small are what separate the people who find hosting effortless from the people who find it draining. The same tools on both sides — a different way of working.

The parts that look after themselves here

Steps that never deserved your time are taken out: certificates issue and reissue themselves, the installer handles application setup, the daily copy absorbs the what-ifs, and per-site settings live in a panel rather than a configuration file. The guide covers the remainder — the part that is actually about your site.

Should a step still misfire, support answers at any hour with an actual fix rather than a knowledge-base link and a shrug. Half the guides on this site began as repeat patterns in our ticket queue.

One control panel running the hosting and the names side by side

Why this job is shorter on our plans

Every walkthrough in this library is run on the platform we actually operate — cPanel, LiteSpeed, NVMe, one-click installs — so the instructions match your screen rather than gesturing at it from a distance.

The rate you register at is the rate you renew at, so year two costs precisely what year one did — nothing lying in wait on the invoice.

  • Every step checked exactly as published
  • The snag named before it arrives
  • The dull steps taken out of your way
  • People reachable at any hour you stall

Why Hosting & Domains

Standard on every plan

Jargon never charges you

Every term is defined on the spot or linked to the jargon buster — nothing assumes prior knowledge.

The dull parts automated

SSL, backups and installs look after themselves here, leaving the guide to cover only what is genuinely yours.

The snag, flagged up front

The classic error for this particular task is named before step one, which is how 20 minutes stays 20 minutes.

Works exactly as printed

Every step is proven on the platform we run — none of the 'your host may vary' hedging.

Honest about how big it is

Flush out years of accumulated clutter and leave a database that responds faster is a intermediate-level job — set aside 20 minutes, with the platform-absorbed steps marked.

5 steps, nothing padded

Each stage is a few minutes of steady clicking, and the fiddly moments are labelled fiddly.

Quick Start

Order placed to site online

  1. 1

    Back up before you delete anything

    Whatever the button says, cleaning a database means deleting rows. Take a snapshot first, because an optimise run with no way back is how something irreplaceable disappears.

  2. 2

    Purge the revision mountain

    By default every edit you have ever made is kept for ever. A cleanup plugin or a single WP-CLI command clears thousands in one go, and on an older site this is usually the biggest reclaim available.

  3. 3

    Clear out expired transients

    Plugins cache data as transients that are supposed to expire and often do not. It is a quick, safe clear-out, and on a site that has run for years the effect can be considerable.

  4. 4

    Sweep up the leftovers

    Spam comments, trashed posts, orphaned metadata from plugins removed years ago. None of it earns its place, and all of it can go.

  5. 5

    Cap revisions from now on

    Add a modest WP_POST_REVISIONS value to wp-config.php. Do that once and future cleanups become light maintenance rather than an excavation through five years of edit history.

Built In

Fitted to every plan

  • PHP versions set per site from the control panel
  • A daily copy, with restores you run yourself from the panel
  • People on the support desk every hour of every day
  • WebP image optimisation built in, at no extra charge
  • DDoS filtering absorbed at the network edge
  • Staging copies for trying a change before it goes live
  • Softaculous included for one-click application installs
  • Upgrades applied in place, with no migration when you change plan
  • Money back within 30 days on hosting plans, 7 on reseller
  • Spam and virus screening on every mailbox by default

Frequently Asked

The questions that come up most

Is a large database what makes a site slow?

Sheer size, barely. Bloat sitting in the hot paths, very much so. Oversized autoloaded options and piles of stale transients drag on every request, whereas a million tidily stored revisions mostly just swell your backups. Go for the hot paths first.

How often should the database get a clean?

Quarterly on a busy site, with each pass getting shorter once revisions are capped. The pattern is one deep clean followed by light upkeep. On a five-year-old site the first cleanup is an event and every one after it is a chore.

What happens when I outgrow the plan?

You upgrade 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 full dedicated machines. Growth becomes a setting on the account rather than a search for a new host.

Does hosting include mail?

Yes — every hosting plan includes mailboxes at your own name, with webmail, IMAP, POP and SMTP plus spam filtering on from the start. There is standalone email hosting too, for a name whose website lives somewhere else.

Keep reading

  • How to Choose a Domain Name

    Land on a name that still sounds right after years of saying it every day — beginner level, about an evening of thought.

  • How to Create a Contact Form

    A form visitors actually complete, sending mail that actually arrives — beginner level, about 30 minutes.

  • Best Drupal vs WordPress

    A shortlist with the working shown: what to check, and the single trap most buyers fall into.

  • WordPress Hosting

    WordPress looked after for you — LiteSpeed caching, staging copies and a daily backup.

  • VPS Hosting

    KVM virtual servers — root access, DDoS filtering, one flat monthly figure.

Changing hosts? Run through our checklist first.

A plain order of work for a move nobody visiting will notice: which files go over first, how to carry the mail across without losing a message, when exactly to repoint DNS, and the two mistakes behind nearly every outage we are asked to rescue.

What arrives is the checklist, and then the occasional note on keeping a site quick. Leave whenever you like; the privacy policy covers the rest.

Do it properly this time.

Free SSL, a free migration, renewals billed at the original rate, and people on support around the clock. That is the whole of it.

View WordPress Hosting plans