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
On this page
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 Size | Status | Impact |
|---|---|---|
| < 800 KB | Healthy | Sub-millisecond parsing |
| 800 KB – 2 MB | Warning | Noticeable memory consumption |
| > 2 MB | Critical | High 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.
Keep reading
Performance
2 min read
How to Reduce WordPress TTFB: A Server & Database Guide
Step-by-step guide to reducing WordPress Time to First Byte (TTFB) below 200ms: cURL profiling, PHP OPcache, MySQL buffer pools, and edge caching.
- WordPress
- TTFB
- Performance
Performance
2 min read
How to Fix a Slow WordPress Admin Dashboard (wp-admin)
Diagnose and fix a sluggish WordPress admin: Query Monitor inspection, Heartbeat API control, WooCommerce background jobs, and transients cleanup.
- WordPress
- wp-admin
- Query Monitor
Performance
2 min read
Redis Object Caching for WordPress: Setup, Metrics & Architecture
When and how to use Redis persistent object caching in WordPress: cache hit ratios, drop-in configuration, WooCommerce considerations, and debugging.
- WordPress
- Redis
- Object Cache