Optimization Guide

WordPress
Autoload Bloat

Every WordPress request loads your entire autoload set from wp_options. If it's bloated, every page pays the price.

What Is Autoloaded Data?

WordPress has a single query that runs on every page load, before any theme or plugin code executes:

SELECT option_name, option_value
FROM wp_options
WHERE autoload = 'yes'

This loads all "autoloaded" options into memory at once. WordPress core needs about 100KB of this data. The problem is that plugins abuse it.

The Pattern

You deactivate a plugin. Its data stays in wp_options with autoload='yes'. You install 30 plugins over 2 years. Now you're loading 5MB of data on every request—most of it from plugins you don't even use anymore.

Unlike slow queries that spike your TTFB intermittently, autoload bloat is a constant tax. It adds latency to every single request—cached or not, frontend or admin, AJAX or page load.

Healthy Autoload Size: Thresholds for wp_options

Check your autoloaded data size right now:

SELECT SUM(LENGTH(option_value)) AS autoload_size
FROM wp_options
WHERE autoload IN ('yes', 'on');

Note: WordPress 6.4+ uses 'on'/'off' in addition to 'yes'/'no' for the autoload column. The query above covers both formats.

<300KB
Healthy
300KB–1MB
Worth Investigating
>1MB
Action Required

Sites over 3MB of autoloaded data are common. We've seen sites with 10MB+ —that's 10MB transferred from MySQL to PHP on every single request, before WordPress even starts building the page.

What Causes WordPress Autoload Bloat

1. Deactivated Plugin Leftovers

Most plugins don't clean up after themselves. They add options on activation and leave them forever—even after deactivation and deletion. Find them:

SELECT option_name, LENGTH(option_value) AS size
FROM wp_options
WHERE autoload = 'yes'
ORDER BY size DESC
LIMIT 20;

Look for option names from plugins you no longer use. These are safe to set to autoload='no' or delete entirely.

2. Serialized Arrays That Grow

Some plugins store growing data in a single option: logs, analytics snapshots, cron schedules. A single option_value can be 500KB+ of serialized PHP.

3. Expired Transients

Transients are temporary cached values stored in wp_options. Without an external object cache, expired transients accumulate. WordPress only cleans them lazily—when they're next accessed. These stale transients can also show up as slow queries when the table grows large enough.

SELECT COUNT(*) FROM wp_options
WHERE option_name LIKE '_transient_%'
AND autoload = 'yes';

4. Misconfigured Plugins

Plugins that store per-user settings, large JSON configs, or cached API responses in autoloaded options. The data might be needed, but it doesn't need to load on every request.

How to Audit Autoloaded Data in wp_options

  1. Check total autoload size — Run the SQL query above. Over 1MB means immediate investigation is needed.
  2. Find the biggest offenders — Sort autoloaded options by LENGTH(option_value). The top 10 usually account for 80%+ of the bloat.
  3. Identify orphaned data — Cross-reference option names with your active plugins. Options from deactivated plugins are safe to touch.
  4. Test before changing — Set autoload='no' one option at a time. Verify the site still works. Some options genuinely need autoloading (core settings, active theme/plugin configs).
  5. Clean expired transients — Delete transients that have passed their timeout. This is always safe.

How to Fix Autoload Bloat in WordPress

Disable Autoload for Specific Options

UPDATE wp_options SET autoload = 'no'
WHERE option_name = 'old_plugin_settings';

Clean Expired Transients

DELETE FROM wp_options
WHERE option_name LIKE '_transient_timeout_%'
AND option_value < UNIX_TIMESTAMP();

Delete Orphaned Plugin Data

-- Only after confirming the plugin is gone:
DELETE FROM wp_options
WHERE option_name LIKE 'removed_plugin_%';

The problem with manual fixes: they don't stay fixed. Plugins keep adding data. Transients re-accumulate. New plugins bring new autoloaded options. You'd need to audit monthly to keep it under control.

Why Autoload Bloat Keeps Growing

Autoload bloat is progressive. It grows slowly, 50KB at a time, invisible until your site is noticeably slower and you can't figure out why.

  1. New plugin installed → 200KB of autoloaded config options
  2. Plugin deactivated → data stays, still autoloading
  3. Transient cache miss → new transient stored with autoload
  4. Plugin update → migration adds new autoloaded rows

If you're also noticing a slow WordPress admin dashboard, autoload bloat is often the hidden cause. You need a tool that monitors your autoload size continuously and tells you exactly which options are wasting memory—before it becomes a performance problem.

Automate Autoload Cleanup

WP Multitool's Autoloader Optimizer monitors your wp_options table, identifies bloated and orphaned autoloaded data, and shows you exactly what's safe to clean up.

Get WP Multitool Backend Performance Guide