Case Studies AutoloadForge: taming WordPress autoloaded option bloat

AutoloadForge: taming WordPress autoloaded option bloat

2 min read

AutoloadForge: taming WordPress autoloaded option bloat
TL;DR WordPress loads every option marked autoload on every request. Over time plugins leave behind big autoloaded rows that slow the whole site. AutoloadForge surfaces the worst offenders, guesses which plugin each one belongs to, and lets you turn autoload off in a way you can undo.

Every WordPress request starts by loading the autoloaded options. It is invisible until it is not. On sites that have run for years, that pile grows quietly as plugins come and go, and a lot of what stays behind is never read again. I built AutoloadForge to make that pile visible and safe to trim.

Here is the story of why, and how it works.

The problem

WordPress keeps site settings in the wp_options table. Each row can be flagged to autoload, which tells WordPress to pull it into memory at the start of every request. That is the right call for things read on every page. It is the wrong call for a 200 KB blob left by a plugin you removed two years ago.

The trouble is that nothing cleans this up. Uninstall a plugin and its autoloaded options often stay, still flagged to load on every request. Multiply that across a site's history and you get a fat autoload payload that every visitor and every admin click pays for before a single byte of the page renders.

Most site owners never see it, because there is no screen in WordPress that shows it.

The approach

I wanted three things from the tool.

  • Show the truth. List the autoloaded options by size, worst first, so you can see where the weight actually is.
  • Name the culprit. A raw option key like wpseo_taxonomy_meta means nothing to most people. AutoloadForge traces each option to the plugin it most likely belongs to, so you know what you are looking at.
  • Make it reversible. The whole point is to trim with confidence. Switching autoload off should be a flip you can flip back, not a delete.

What shipped

AutoloadForge lives on one screen under Tools. It scans wp_options, ranks the autoloaded entries by size, and for each one shows a best guess at the source plugin. You can switch autoload off for the entries you do not need, and switch it back on if something turns out to matter. Nothing is deleted, so there is no scary permanent action.

The result is a site that loads a little less on every request, and an admin that stops carrying dead weight from plugins that left the building long ago.

What I learned building it

The hard part was not reading the table. It was the guessing. Mapping an opaque option key back to a plugin means pattern-matching prefixes and known conventions, and being honest when the guess is uncertain. I would rather show "likely from this plugin" than pretend to a certainty the data does not support. Tools that overstate their confidence are how people break their sites.

If your WordPress admin feels sluggish for no obvious reason, the autoload pile is worth a look. AutoloadForge is free on WordPress.org.

FAQ

What are autoloaded options in WordPress?

Options in the wp_options table can be marked to autoload, which means WordPress fetches them on every page load into memory. A handful is fine. Hundreds of kilobytes of stale autoloaded data, often left by removed plugins, adds weight to every single request.

Is turning off autoload safe?

For genuinely unused data, yes. The risk is turning off something a plugin reads on every request, which would then hit the database each time instead. AutoloadForge makes the change reversible and shows you what each option looks like, so you can flip it back if anything misbehaves.

How much does autoload bloat actually matter?

It depends on the size. A few kilobytes is noise. Once the autoloaded total runs into hundreds of kilobytes or more, every request pays to load it before rendering anything. Trimming it is one of the cheapest wins on a slow WordPress admin.