Support changing autoload value for largest autoloaded options #889
Labels
[Focus] Database Optimization
Issues related to the Database Optimization focus area
[Module] Audit Autoloaded Options
Issues for the Audit Autoloaded Options Health Check module
[Type] Enhancement
A suggestion for improvement of an existing feature
Milestone
As discussed a while ago (I believe initially at WCUS 2022 contributor day), the autoloaded options Site Health check needs to be actionable. While showing the largest autoloaded options is great, without a way to fix the issue it's not all that helpful.
The Site Health check should make use of the new
wp_set_option_autoload()
function introduced in WordPress 6.4 (see this dev note post) to allow disabling autoload for a given option. Any changed option should be stored persistently in a list so that WordPress keeps track of it. The Site Health check should also allow reverting any changed option (in case changing it causes problems).Requirements
All of the below requirements should only take effect if the
wp_set_option_autoload()
function is available.no
, and the option's name should be added to the array of options for which the user changed the value (e.g. a new optionperflab_aao_modified_options
).perflab_aao_modified_options
list is not empty, the list of these options should be displayed at the bottom of the Site Health check, with each option being accompanied with a "Revert to autoload" CTA link.The text was updated successfully, but these errors were encountered: