Knowledgebase

Managing Autoloaded Data in WordPress Print

  • databasesphpmyadmin, databases, wordpress, plugins, performance, woocommerce, caching, troubleshooting
  • 0

A specific and common performance problem.

WHAT IT IS

Options marked for autoload are loaded into memory on every single page request, whether needed or not.

WHY IT MATTERS

A few hundred kilobytes of autoloaded data is normal. Several megabytes is not, and it slows every request on the site.

Plugins sometimes store large values as autoloaded options, including caches and logs that should not be.

FINDING IT

SELECT option_name, LENGTH(option_value) FROM wp_options WHERE autoload = 'yes' ORDER BY LENGTH(option_value) DESC LIMIT 20;

That lists the largest autoloaded options.

WHAT YOU WILL FIND

Frequently a single option of several megabytes, belonging to a plugin, sometimes one you removed long ago.

WHAT TO DO

If it belongs to a plugin you no longer use, the option is orphaned and can be removed.

If it belongs to an active plugin, check for an update, and report it to the developer.

You can also set autoload to no for a specific option, though that risks breaking the plugin if it expects it loaded.

BACK UP FIRST

Always, before touching the options table.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot