Call (Russian) Telegram WhatsApp

Guide to Cleaning Autoload Data in WordPress: Boost Your Site’s Performance

What Are Autoloaded Options?

In WordPress, autoloaded options are configuration settings that automatically load with every page request. Stored in your database’s wp_options table (with the autoload field set to yes), these include:

  • Core settings (site URL, timezone)
  • Active plugin configurations
  • Theme customization data
  • Cached transients

While essential for functionality, unchecked accumulation can severely impact performance.

Why Clean Autoloaded Data?

  1. Reduce Database Bloat: Autoloaded data inflates your wp_options table, slowing queries.
  2. Improve Page Speed: Fewer database calls = faster page loads (measured by TTFB).
  3. Fix «Options Table Full» Errors: Prevents MySQL crashes on resource-limited hosting.
  4. Optimize Server Resources: Lowers CPU/memory usage during traffic spikes.
  5. Streamline Backups: Smaller databases = quicker backups and migrations.

Warning: Precautions First!

  • Backup Your Database: Use UpdraftPlus or phpMyAdmin before making changes.
  • Identify Critical Data: Never delete options starting with:
    siteurlhomeactive_pluginstemplatestylesheetrewrite_rules
  • Deactivate Plugins Temporarily: Some may recreate essential options if missing.

Step-by-Step Cleaning Methods

Method 1: Using Plugins (Beginner-Friendly)

Recommended Tools:

Steps with WP-Optimize:

  1. Install and activate the plugin.
  2. Go to WP-Optimize → Database.
  3. Check «Clean autoload options» under Clean options table.
  4. Click «Run Optimization».
  5. Monitor results in the «Autoload data size» metric.

Method 2: Manual Cleaning via phpMyAdmin (Advanced)

  1. Access phpMyAdmin via your hosting control panel.
  2. Select your WordPress database.
  3. Open the wp_options table (prefix may vary).
  4. Click SQL and run this query to identify candidates:

5 Carefully delete unnecessary entries using:

  1. Replace unneeded_option with actual option names)

Method 3: WP-CLI Commands (Developers)

  1. Connect to your server via SSH.
  2. List largest autoloaded options:

3 Delete specific options (e.g., old plugin data):

4 Bulk clean transients:

Identifying Safe-to-Remove Data

TypeExamplesRisk Level
Plugin Residueold_plugin_settingsjetpack_verification_codeLow
Expired Transients_transient_timeout_*_site_transient_*Low
Unused Theme Modstheme_mods_oldthemeMedium
Orphaned Datarecently_editedwidget_deleted_pagesMedium
Core WordPresscroncan_compress_scriptsHigh (Do not remove!)

→ Verify unknown options via WordPress Option Reference before deletion.


Best Practices for Maintenance

  1. Audit Quarterly: Schedule cleanups every 3-6 months.
  2. Limit New Autoloads: Plugins like Disable Autoload prevent unnecessary additions.
  3. Monitor Size: Track wp_options growth via Query Monitor plugin.
  4. Transient Management: Use Transient Cleaner for automated cleanup.
  5. Avoid Over-Cleaning: Never delete >15% of autoloaded options at once.

Troubleshooting

Issue: «Site broken after cleanup»

  • Solution: Restore database backup, then selectively re-add critical options.

Issue: «Options regenerating immediately»

  • Solution: Deactivate culprit plugins before cleaning.

Issue: «Unknown options reappearing»

  • Solution: Search plugin source code for add_option( 'option_name', 'value', '', 'yes' ).

Conclusion

Autoloaded data accumulation is a silent performance killer in WordPress. Regular cleaning can reduce database load by 30-60%, significantly improving TTFB and user experience. For most users, WP-Optimize provides the safest approach, while developers benefit from WP-CLI precision. Always prioritize backups, and when in doubt, consult a specialist. Keep your wp_options lean—your server and visitors will thank you!