wp_options where autoload is enabled. Understanding what happens internally during that load makes the problem obvious and the fix straightforward.
What happens when WordPress boots
wp_load_alloptions(). This function runs a single SQL query:
SQL
SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'get_option() anywhere in WordPress core, themes, or plugins reads from that in-memory array instead of hitting the database again.
This design is intentional. WordPress assumes most options are small — a site URL, a date format, a plugin toggle — and loading them all in one query is faster than running hundreds of individual SELECT statements. For a clean WordPress install, the total autoloaded data is typically a few hundred kilobytes. No problem.
The problem starts when plugins store large serialized arrays, JSON blobs, or cached data as autoloaded options. A single option row can hold megabytes of serialized data. Some plugins store entire configuration trees, CSS output, or analytics data in wp_options with autoload enabled. Plugins that get deactivated or deleted often leave their rows behind — still autoloaded, still pulled into memory on every request, serving no purpose.
When the total autoloaded data grows to several megabytes, that single bootstrap query becomes expensive. MySQL has to read and transmit more data. PHP has to allocate memory to hold it. This happens on every single admin page load, because the admin area cannot be page-cached — every click triggers fresh PHP execution and a fresh call to wp_load_alloptions().
For a deeper look at why admin pages specifically suffer while the frontend stays fast, there is a related explanation in Why WordPress Admin Is Slow Even When the Frontend Loads Fast.
How to measure autoloaded data size
mysql CLI client, or WP-CLI, and run:
SQL
SELECT SUM(LENGTH(option_value)) AS autoload_size
FROM wp_options
WHERE autoload = 'yes';autoload column values. Older versions use 'yes' and 'no'. Newer versions may use 'on', 'off', or other values. If the query above returns zero and you know you have options, try:
SQL
SELECT SUM(LENGTH(option_value)) AS autoload_size
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on');Finding the biggest offenders
SQL
SELECT option_name, LENGTH(option_value) AS size_bytes
FROM wp_options
WHERE autoload = 'yes'
ORDER BY size_bytes DESC
LIMIT 30;_transient_* or _site_transient_* are meant to be temporary cached data. WordPress has a lazy garbage collection mechanism for expired transients — it only deletes them when something tries to read them. If nothing reads an expired transient, it sits in wp_options forever, still autoloaded. Plugins that generate many transients and then get removed leave orphaned transient data behind.
Deactivated or deleted plugin settings. A plugin stores its config in an option like myplugin_settings with autoload on. You remove the plugin. The option stays. If that option held a large serialized array — widget configurations, cached API responses, compiled CSS — it is now dead weight loaded on every request.
Oversized active plugin data. Some plugins legitimately store large data in autoloaded options: page builder CSS, analytics summaries, license check caches. These are harder to deal with because the plugin expects the data to be there. The fix is usually a plugin setting or an alternative storage method.
Revisions of serialized data. Some plugins update a large option on every save, and certain setups or additional plugins create revision-like copies.
For a more detailed walkthrough of auditing autoloaded options and preventing out-of-memory errors from this same root cause, see Auditing Autoloaded Options to Stop Recurring WordPress Out-of-Memory Errors.
Cleaning autoloaded bloat safely
BASH
wp transient delete --expired --allow-root_transient_timeout_* row stores the expiry timestamp. A transient is expired when its timeout value is less than the current Unix timestamp.
Options from removed plugins: If the plugin is gone and you have confirmed the option belongs to it (the option name usually contains the plugin slug), you can delete the row. Always take a database backup first.
Before deleting any row from wp_options manually, back up the database. A wrong deletion can break your site. If you are not sure whether an option is still in use, change its autoload value to 'no' first instead of deleting it. This stops it from loading on every request but keeps the data intact in case something still needs it.To flip autoload off for a specific option:
SQL
UPDATE wp_options SET autoload = 'no' WHERE option_name = 'some_old_plugin_cache';Why this is invisible to most monitoring
Preventing future bloat
SELECT option_name FROM wp_options WHERE option_name LIKE '%pluginslug%' after removal shows what was left.
Periodically run the size check query from earlier. Once a quarter is enough for most sites. If autoloaded data has grown significantly, investigate what was added.
If you develop plugins or custom functionality, only set autoload to 'yes' for options that are genuinely needed on every page load. Configuration that is only read on specific admin pages or during cron jobs should use autoload = 'no'. The add_option() and update_option() functions accept an autoload parameter.
An object cache (Redis or Memcached with a persistent object cache drop-in) helps reduce the impact because wp_load_alloptions() results get stored in the external cache and do not require a database round-trip on every request. But this masks the problem rather than fixing it — the data still gets loaded into PHP memory from the cache backend. Cleaning the source is better than caching around it.
The practical takeaway: when WordPress admin is slow and server resources look fine, check autoloaded data size in wp_options before changing anything else. It is a five-second query that often explains minutes of frustration.