Skip to main content
Cookbook Performance

Find and fix autoloaded options bloat with AI

Track down the orphaned options, stale transients, and dead theme hooks weighing on every page load, and clear them safely.

Difficulty Intermediate
Time ~15 min
Tools run_wp_cli, read_file

Prerequisites

A connected site and a recent backup before deleting any options.

The prompt
Find what is bloating the options WordPress autoloads on every request on [your site], then help me clear it safely. Read-only first.

1. Measure the total autoloaded size. Modern WordPress spreads autoload across several values, so include everything that loads automatically (autoload not in 'no' or 'off') and list the 20 largest autoloaded options with their sizes.
2. Flag any option that looks orphaned, meaning its prefix belongs to a plugin I no longer have installed, and tell me which plugin each prefix points to.
3. Count the expired transients sitting in my options table.
4. Read my active theme's functions.php and flag any hooks that call functions or plugins that no longer exist, so I can remove them by hand.

Show me the shortlist and wait. After I review it, delete only the specific options and transients I confirm, by exact name, one at a time so I can see each result. Do not run an unbounded delete-everything-expired sweep. I will take a backup before I approve any deletion.

Already connected to WPVibe?

Skip the copy-paste. Just ask your AI for the “Find and fix autoloaded options bloat with AI” recipe, or describe the task, and WPVibe runs these steps on your own site.

Every WordPress page load pulls a block of autoloaded options into memory before a single pixel renders. Plugins you removed months ago often leave their options behind, transients pile up as stale cache that never gets swept, and a few dead hooks linger in your theme’s functions.php and keep firing for nothing. Each piece is tiny on its own. Together they pad every request, and the Site Health autoload warning tells you it is happening without ever telling you what is safe to remove.

Your connected AI measures exactly what loads on every request, lists the largest options, and flags the ones that look orphaned by matching their prefix to a plugin you no longer run. Modern WordPress spreads autoload across several settings, so it checks all of them rather than just the old one. It counts the expired transients cluttering your table and reads your theme’s functions.php to point out hooks that reference things that no longer exist. It reads and reports first, then removes only what you confirm.

Paste the prompt and read the shortlist it gives you back. Take a backup before you approve anything, because an option that looks abandoned might belong to a plugin you forgot is only dormant. Have the AI delete by exact name, one at a time, after you have looked at the list, rather than clearing everything expired in a single unbounded sweep. Bounded, reviewed deletes are the safe way to trim this, and dead functions.php hooks are a change you make by hand once the AI has flagged them.

Outcome

A reviewed shortlist of the heaviest and most likely-orphaned autoloaded options, cleared by exact name with your approval.