Stop Database Bloat by Fixing Your WordPress Base Configuration

When WordPress websites become sluggish, the problem often begins at the base level — misconfigured settings, unnecessary autoloaded data, and bloated options stored in the database. These silent performance killers accumulate over time and can dramatically slow down page loading and admin performance.
Let’s break down how to diagnose, clean, and prevent database bloat by addressing your core WordPress base configuration.
1. Check for Autoload Bloat
Many plugins add settings into the wp_options
table with autoload = 'yes'
. These are loaded on every page load — even on the frontend — whether they’re needed or not.
Run this SQL query to detect the heaviest autoloaded records:
SELECT option_name, LENGTH(option_value) AS size
FROM wp_options
WHERE autoload = 'yes'
ORDER BY size DESC
LIMIT 20;
If you see values over 500,000 bytes, that’s a red flag. These should be reviewed and, in many cases, deleted or moved to transients.
2. Remove Expired Transients
Transients are cached data stored in the database. WordPress doesn’t always delete them automatically. Use this query to clean them up:
DELETE FROM wp_options
WHERE option_name LIKE '_transient_%'
AND option_name NOT LIKE '_transient_timeout_%';
And this to remove expired ones:
DELETE FROM wp_options
WHERE option_name LIKE '_transient_timeout_%'
AND option_value < UNIX_TIMESTAMP();
This can significantly reduce the size of your database and improve backend performance.
3. Analyze Base Plugin Footprint
Some plugins load unnecessary scripts, styles, and options, even when not used. A well-optimized base setup includes disabling unused features and removing unnecessary plugin entries from autoload.
Use tools like Query Monitor and Advanced Database Cleaner to get a detailed view.
4. Disable Unused Autoloads (With Caution)
To disable multiple autoloaded options at once (for testing or cleanup), run:
UPDATE wp_options
SET autoload = 'no'
WHERE autoload = 'yes'
AND option_name NOT LIKE 'site%'
AND option_name NOT LIKE 'home'
AND option_name NOT LIKE 'active_plugins';
⚠️ Always back up your database before bulk-editing autoload flags.
5. Clean Theme Framework Options
If you’re using a theme like Woodmart, its configuration file (xts_options
) can grow large and affect performance. You can:
- Export theme settings
- Clean the JSON manually (remove wishlist, portfolio, extra headers)
- Import the cleaned base back into the theme
This minimizes stored data while preserving key design choices.
A well-maintained WordPress base ensures your database stays clean, your site loads fast, and your users stay happy.
Learn more about our optimization process on the
SpeedWP Pro service page