OG Database Cleaner Guide

Jellybean, the OG Nexus mascot: OG Database Cleaner Guide

OG Database Cleaner is the WordPress plugin we build at OG Nexus for tidying the database. It finds rows that nothing uses any more. Think old post revisions, expired transients, orphaned metadata and unused terms. You review them in your WordPress admin, then clean what you choose.

It runs on og-nexus.com, so this guide uses our own database as the example. Every number below comes from our live site on 27 November 2026.

What our own database looks like

The Database Cleaner dashboard opens with the size of the database and its history. Ours measured 292.83 MB across 151 tables. Nine days earlier, on 18 November, it was 197.38 MB.

The list of biggest tables tells you where that space lives. On our site, the two biggest tables hold over 60% of it, and both belong to features we use every day. One is wp_postmeta, the extra data stored with posts, pages and products, at 85.45 MB (about 29%).

That is the first lesson. A big or growing database is not always junk. The cleaner shows you what each table is before you delete anything.

What the scan checks

The scan groups cleanable rows by type. Each group has a short note that explains what it is. The main groups are:

Revisions. Older saved versions of posts. They only matter if you want to roll back.

Auto Drafts. WordPress saves a draft of your post every 60 seconds while you write.

Deleted Posts, spam comments and trashed comments.

Orphaned meta. Post, term, user and comment meta whose parent record is gone.

Duplicated meta. Rows with the same post, key and value.

Expired Transients. Cached values that outlived their expiry date.

Unused Terms and oEmbed caches.

Beyond these, Expert mode adds screens for post types, tables, options, metadata and cron jobs.

Our counts, and why low numbers are good news

Database Cleaner only counts rows older than its age threshold. Ours is set to 7 days, so anything newer is left alone. With that setting, our scan found:

88 revisions.

1 auto draft.

0 orphaned post meta and 0 orphaned user meta.

0 expired transients.

A count of 0 does not mean the plugin is broken. It means there is nothing older than the threshold to clean. A young or well-kept site will often look like ours. Older sites with years of plugin trials usually show far more.

Transients deserve a word. WordPress uses them as a short-term cache. They normally vanish when they expire. If nothing reads one before its expiry, it can stay in the database. The WordPress Transients API handbook explains how they work.

Orphaned data, specifically

"Orphaned" means a row whose parent record is gone. One example is postmeta pointing to a post ID that no longer exists. Another is a settings row left in wp_options after a plugin was deleted.

These rows do not break a working site. But they build up after theme changes, plugin trials and content moves. They also add weight to every backup.

How it labels what it finds

On the tables, options and cron screens, each row shows the plugin that owns it, when the cleaner knows. Two labels need care:

n/a means the owner is unknown. It does not mean the row is unused. Themes and custom code are rarely on the list.

warn means the owning plugin is no longer installed. That is a good hint. But a plugin you plan to reinstall looks exactly the same.

Rows owned by WordPress itself are never deleted. Core tables can never be dropped, whatever the settings say.

Cleaning: manual first, automatic only if you choose

Nothing is cleaned until you press the button. Some items are marked for automatic cleaning, such as revisions and expired transients. Others, like duplicated meta and all transients, are manual-only.

The Pro version can also run a scheduled clean. The setting is called Enable Scheduled Auto-Clean. On og-nexus.com it is switched off. We prefer to look first.

Large jobs run in batches, so a big database does not time out. Our batch size is 100 rows.

Back up first. Really.

Deletions are permanent. There is no trash and no undo inside the plugin. Only a database backup can bring a row back.

One more thing surprises people. Deleting rows does not shrink the database on disk straight away. The space comes back when you optimise the tables.

What we would do first

1

Take a full database backup and check that it downloads.

2

Open the dashboard and look at the biggest tables. Find out what they are before you touch them.

3

Clean the safe groups first: revisions, auto drafts and expired transients.

4

Leave anything marked n/a alone until you know who owns it.

5

Optimise the tables to get the disk space back.

6

Test your forms, checkout and login afterwards.

What it does not do

It does not speed up slow hosting, heavy images or render-blocking scripts. It only changes the size and shape of your database tables. Treat it as one step in a maintenance routine.

It also cannot tell whether a row with an unfamiliar name is safe to remove. If a label is unclear, leave it and investigate its source first. On sites with custom code, test on a staging copy before you clean the live site.

Who it is for

Site owners and agencies with WordPress sites that have a long history. That means many redesigns, plugin trials or migrations. On a new site it will find little, and that is fine.

Getting it

See the OG Database Cleaner product page. For the same job on unused image and upload files, read our OG Media Cleaner guide. Both are part of the wider OG plugin family.