Autoloaded Options in WordPress: How to Find and Fix wp_options Bloat

Autoloaded options are WordPress settings that are loaded automatically during a request. That is useful for small settings needed across the site. It becomes a problem when plugins or themes autoload large amounts of data that most requests do not need.

This is one of the database issues that can affect many pages at once. The fix is not to delete random rows from wp_options. First measure the total, find the largest options, identify their owner, and decide whether the data is still needed.

What autoload means

WordPress stores many site, theme, and plugin settings in the options table. Some options are marked so WordPress loads them together early in the request. This avoids running a separate query each time code asks for a common setting.

Autoload is helpful when the value is small and used often. It is wasteful when the value is large, rarely used, or belongs only to one admin screen. Too much autoloaded data means every request carries settings it may never use.

WordPress documentation warns that having too many autoloaded options can slow a site. Site Health uses the combined size as a performance signal and currently warns when the autoloaded data passes its threshold of about 800 KB.

The 800 KB number is a warning, not a magic cliff

Do not treat 799 KB as perfect and 801 KB as broken. The threshold is a practical warning. Real impact depends on the server, persistent object cache, option count, data structure, and what the request is doing.

A site well below the threshold can still have one badly designed option. A site somewhat above it may appear fast because full-page caching hides most PHP work for anonymous visitors. Logged-in requests, admin screens, cache misses, API requests, and cron can still pay the cost.

Use the warning to start an investigation, not to justify blind deletion.

Start with Site Health

Open Tools > Site Health in WordPress and review performance recommendations. If WordPress reports excessive autoloaded options, record the size before changing anything.

Site Health does not tell you which plugin can be safely removed. For that you need to inspect the option names and sizes. Some hosting dashboards and database tools show this. Developers can also use WP-CLI or a careful database query to list large autoloaded rows.

If you do not understand the data, stop at the list. Identification is safe. Deletion is the risky part.

Look for large individual values

A long list of tiny options and one giant serialized array are different problems. Sort by value size and inspect the largest rows first. Names often include a plugin or theme prefix that helps identify the owner.

Large options sometimes contain cached API data, logs, generated CSS, page-builder settings, rewrite data, or a huge list of plugin configuration. Some of that may be needed. Some may be stale after a plugin was removed.

Search the option name in the plugin’s code or documentation when ownership is unclear. Do not guess from a vague prefix.

Find inactive-plugin leftovers

A common source of bloat is a plugin that was deleted but left its settings behind. That does not make every leftover row safe to remove. Some plugins preserve data on purpose so settings return if the plugin is reinstalled.

If you know the plugin is gone permanently, check its official uninstall behavior. Back up the database, remove the data through an uninstall routine when possible, and retest.

The broader WordPress database cleanup guide covers old tables, revisions, transients, and logs that are separate from autoloaded options.

Do not change the autoload flag without understanding usage

An option used on nearly every page is a good candidate for autoload. Turning it off may force extra database lookups. The goal is not “zero autoload.” The goal is keeping frequently used settings easy to access while moving large, rarely used values out of the automatic set.

Modern WordPress APIs let developers control an option’s autoload behavior. WordPress also applies heuristics for very large new options when a developer does not set the value explicitly. Plugin authors should still choose the behavior that matches how their data is used.

Persistent object cache changes the cost, not the design rule

With a persistent object cache, WordPress can keep options data in memory between requests. This can make repeated loads faster. It does not make unnecessary megabytes of autoloaded configuration a good design.

If the site already uses Redis, check whether it is healthy before assuming the database is serving the same options on every request. Our Redis object cache guide explains the difference between normal and persistent object caching.

Watch generated CSS and page-builder data

Some themes and builders save generated CSS, template data, or large configuration arrays in options. If a feature stores a large site-wide value and autoloads it, every PHP request can carry that data.

Do not delete generated files or options at random. Many tools have a “regenerate CSS,” “clear cache,” or repair action that rebuilds the data safely. Use the product’s supported path first.

Remote API caches do not belong in autoload by default

A plugin may fetch a feed, license response, currency list, or other remote data and store a large result. If that data is only used on one admin page or occasional front-end feature, loading it on every request is wasteful.

This is a plugin design issue. Contact the developer or change the custom code so rarely used large values are not autoloaded. Avoid editing a live plugin’s database schema in a way that will be undone on the next update.

Measure server response after the change

Autoload work happens on the server side, so Time to First Byte and PHP execution are better checks than an image audit. Test uncached requests or logged-in requests where full-page cache is not hiding WordPress work.

If TTFB is still high, use the WordPress TTFB guide. Slow response can come from database queries, remote HTTP calls, PHP workers, CPU limits, cache misses, or hosting.

Use Query Monitor for context

Query Monitor can show database queries, hooks, HTTP requests, and which plugin or theme is responsible for many operations. It will not automatically tell you that a large option is safe to remove, but it helps connect the database symptom to the code that runs on the request.

Use it on staging or during a controlled troubleshooting session. Development tools add their own overhead and should not become a permanent public performance feature without a reason.

A safe autoload audit

  1. Back up the database.
  2. Check Site Health and record the autoloaded-data size.
  3. List the largest autoloaded options by size.
  4. Identify the plugin, theme, or core feature that owns each large option.
  5. Remove only data that is confirmed unused, or use the owner’s uninstall tool.
  6. Change autoload behavior only when you know the option is rarely needed.
  7. Purge relevant object caches after a controlled change.
  8. Retest uncached TTFB, admin requests, and the feature that owned the option.

Do not keep optimizing simply because a number can be made smaller. If autoload is now reasonable and server response did not improve, move on to the next measured bottleneck. The main WordPress speed guide gives a safe order.

For plugin developers

Store small, widely used configuration as autoloaded data when that makes sense. Store large or rarely used values without automatic loading. Clean up plugin-owned data responsibly on uninstall when the user chooses full removal.

Do not store endless logs or large API payloads in one autoloaded option. WordPress now provides APIs for changing option autoload behavior without hand-editing the table, which also keeps cache behavior consistent.

Recheck after major plugin changes

Autoloaded data can grow again after a page builder migration, plugin import, or large settings change. Record the total after cleanup and check it during major maintenance. A trend is more useful than repeatedly deleting rows when a warning appears.

If one option grows again after every cleanup, the owning code is the problem. Fix or replace that behavior rather than scheduling endless database trimming.

Keep the before-and-after size with your maintenance notes so future audits have a useful reference point.

Retest after major plugin migrations too.

This makes future regressions easier to spot and explain.

Sources and further reading

Related FastWP guides