Skip to content

Performance2 min read

WordPress Autoloaded Options: How wp_options Slows Down Your Site

Identify, measure, and safely clean bloated autoloaded options in wp_options. Learn how memory limits and server response times improve.

By Hamza Ahmad AslamFull-Stack & WordPress Engineer

Green code and database queries flowing across a dark screen
Photo by Markus Spiske on Unsplash (opens in a new tab)
On this page
  1. 1. Measure your current autoload size
  2. 2. Identify the top 10 largest autoloaded rows
  3. 3. Safely disable autoload on specific options
  4. Frequently asked questions

Short answer: On every non-cached request, WordPress executes SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'. This single database query loads all autoloaded configuration data into PHP memory before themes or plugins even start executing. In high-performing sites, autoloaded data stays below 800 KB. On neglected sites, this query can balloon to 10 MB or more, consuming massive server RAM and adding 500ms+ to every TTFB response.

Cleaning autoloaded options is one of the highest-ROI speed optimizations in WordPress engineering.

1. Measure your current autoload size

Run this SQL query or WP-CLI command to determine your total autoload payload in bytes:

wp option list --autoload=on --format=total_bytes

Or execute via MySQL client:

SELECT
    ROUND(SUM(LENGTH(option_value)) / 1024 / 1024, 2) AS autoload_size_mb
FROM wp_options
WHERE autoload = 'yes' OR autoload = 'on';
Total Autoload SizeStatusImpact
< 800 KBHealthySub-millisecond parsing
800 KB – 2 MBWarningNoticeable memory consumption
> 2 MBCriticalHigh TTFB, PHP memory spikes, frequent worker kills

2. Identify the top 10 largest autoloaded rows

Find out exactly which plugins or orphaned rows are bloating your memory:

SELECT
    option_name,
    ROUND(LENGTH(option_value) / 1024, 2) AS size_kb
FROM wp_options
WHERE autoload IN ('yes', 'on')
ORDER BY LENGTH(option_value) DESC
LIMIT 10;

Typical culprits include:

  • Abandoned plugin settings left behind after deletion
  • Large serialized logs or transient caching stored directly in options
  • Unserialized arrays of historical orders, redirect maps, or page builder CSS

3. Safely disable autoload on specific options

For large data rows that are only needed on a specific sub-page (and not on every single site visit), turn off autoloading rather than deleting the data:

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

In WordPress 6.6 and newer, WordPress automatically defaults options over 4 KB to autoload = 'off' unless explicitly overridden. However, older databases carry legacy records that must be cleaned manually.


Need expert database profiling and optimization for your WordPress platform? Explore my WordPress Performance Optimization services or request a database cleanup.

Frequently asked questions

Can turning off autoload break plugins?

Yes, if the plugin expects the option to be pre-loaded into memory on every page load. Always test changes on a staging server first and only disable autoload on data identified as logs, cached reports, or settings from inactive plugins.

Do database cleanup plugins fix autoloaded options?

Most generic cleanup plugins only delete revisions and trash posts. They do not analyze custom plugin keys inside wp_options. Meaningful autoload optimization requires manual SQL profiling.

Enjoyed this? Get the next article by email.

Occasional, useful posts. No spam — unsubscribe anytime.