WordPress Database Cleanup for a Busy Gaming Fan Site
Your fan site has run for three years, the admin dashboard takes six seconds to load, and the hosting panel says the database is 900 MB even though you have only 400 posts.

Your fan site has run for three years, the admin dashboard takes six seconds to load, and the hosting panel says the database is 900 MB even though you have only 400 posts. That gap is almost always junk: thousands of post revisions, expired transients, spam comments and tables left behind by plugins you deleted long ago. A careful WordPress database cleanup can cut that size by half and make the editor feel fast again, without touching a single patch note or tier list.
I manage the WordPress side of two gaming communities, one for a survival game and one for a card game wiki, and both went through this exact process. Here is what I clean, what I leave alone, and the order that keeps you out of trouble.
Back Up Before Any WordPress Database Cleanup
This step is not optional. Database cleanup deletes rows permanently, and the most common mistake is removing a table that a still active plugin needs. Take a full export first.
- Use your host's backup tool or phpMyAdmin to export the whole database as a .sql file.
- Download it to your own computer, not just to the server.
- Note the date and the size of the file so you can compare afterwards.
Better still, run the cleanup on a copy first. If you already follow the routine in our guide to using a WordPress staging site before big updates, push a fresh copy to staging, clean it, test it for a day, then repeat on live.
What Actually Fills the Database on a Gaming Site
Gaming sites have a specific problem: content gets updated constantly. Every balance patch means editing the same 30 character guides, and every edit saves a revision. On my survival game site, a single "best base locations" guide had 212 stored revisions. Across the site there were over 38,000 revision rows.
| Junk type | Where it lives | Typical size on a 3 year old fan site |
|---|---|---|
| Post revisions | wp_posts and wp_postmeta | 20,000 to 50,000 rows |
| Expired transients | wp_options | Several thousand rows |
| Spam and trashed comments | wp_comments and wp_commentmeta | Can be tens of thousands after a bot wave |
| Orphaned plugin tables | Separate tables with old prefixes | From a few KB to several hundred MB |
| Autoloaded options | wp_options | Small in rows, heavy in load time |
Comment spam deserves its own note. Guild and clan sites attract bot traffic, and if your login page has also been a target, our walkthrough on stopping brute force logins on a WordPress guild site pairs well with this cleanup.
A Safe Cleanup Order, Step by Step
- Limit future revisions first. Add define('WP_POST_REVISIONS', 5); to wp-config.php. Five is enough to undo a bad edit on a patch guide. Do this before deleting old ones so the pile does not refill.
- Delete old revisions. A cleanup plugin can do this in one click. Keep the newest few per post if the plugin allows it.
- Empty spam and trash comments. Check the spam queue for a minute first. Real players sometimes land there, especially if they paste build codes full of symbols.
- Remove expired transients. These are temporary cached values with a timestamp that has passed. Deleting them is safe; WordPress recreates what it needs.
- Find orphaned tables. Look at table names in phpMyAdmin. A table like wp_oldsliderpro_slides from a plugin you removed in 2023 can go. If you cannot identify a table, leave it.
- Check autoloaded options. Options with autoload set to yes load on every single page request. Sort by size and look for entries over 100 KB from removed plugins.
- Optimise tables last. This reclaims the space freed by all the deletions.
On the card game wiki this order took 25 minutes and the database went from 640 MB to 210 MB. The editor load time dropped from around 5 seconds to under 2.
What I never delete
Some rows look like clutter and are not. User meta for registered members holds forum ranks, guild roles and saved preferences, so leave wp_usermeta alone unless you know exactly which plugin wrote a key. The same goes for anything from your membership, event or leaderboard plugin, even if the table looks huge. A tournament plugin on one of my sites stores every bracket match as a row, and that history is the reason people visit. If a cleanup plugin flags these as "unused", it is guessing. Delete only what you can name, explain and restore.
Why I Do Not Schedule Automatic Cleanups
Most advice tells you to install a cleanup plugin and set it to run weekly. I disagree, at least for community sites with several editors. Automatic schedules run while nobody is watching, and the settings that seemed fine in January may delete something important in June after you add a new plugin that stores data as transients or drafts.
On one site a weekly job set to "delete all auto drafts" wiped a half written tournament recap that a volunteer had been saving as a draft over several evenings. Nobody noticed until she came back to finish it.
My compromise is simple. Limit revisions in wp-config.php so growth stays slow, then do a manual cleanup every three months or after a big plugin change. Pair it with the routine from our WordPress plugin audit for a clan site, since removed plugins are where most orphaned tables come from. A cleanup plugin can stay installed, but deactivated between uses.
How to Check the Cleanup Worked
Do not trust the plugin's own success message. Check three numbers before and after:
- Total database size in your hosting panel
- Admin dashboard load time, measured with your browser's network tab on a cold load
- Time to first byte on a heavy page, such as a big item database or a patch notes archive
Then click through the pages that matter: the homepage, a few top guides, the comment form, the search results page and any custom post types such as character profiles or event listings. If something looks broken, restore the backup and work through the steps one at a time to find the culprit.
FAQ
How often should I clean a WordPress database?
For a gaming site updated several times a week, every three months is plenty once revisions are limited. Clean sooner if you remove a large plugin or recover from a spam comment flood.
Will deleting post revisions hurt my SEO?
No. Search engines only see the published version of a page. Revisions are internal history and never appear on the front end, so removing them has no effect on rankings.
Is it safe to delete transients?
Deleting expired transients is safe because they are past their use date anyway. Deleting all transients is also usually safe, but your site may feel slower for a few minutes while caches rebuild.
What size should a fan site database be?
There is no fixed number, but a site with a few hundred posts and a few thousand comments often sits between 50 and 200 MB after cleanup. If yours is far above that, revisions and orphaned tables are the first places to look.
More in WordPress
WordPress
Stopping Brute Force Logins on a WordPress Guild Site
The first time I opened the access log of a small guild site I help run, I counted 4,200 requests to wp-login.php in a single...
WordPress
WordPress Plugin Audit for a Clan Site Running 40 Plugins
A guild site I helped clean up last year had 43 active plugins. The admins could name maybe 15 of them.
WordPress
How to Use a WordPress Staging Site Before Big Updates
It is Friday night, your guild site has 340 active members, and a plugin update you clicked at 9pm has turned the forum page...