Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support changing autoload value for largest autoloaded options #889

Closed
felixarntz opened this issue Nov 28, 2023 · 0 comments · Fixed by #1048
Closed

Support changing autoload value for largest autoloaded options #889

felixarntz opened this issue Nov 28, 2023 · 0 comments · Fixed by #1048
Assignees
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

Comments

@felixarntz
Copy link
Member

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.

  • The list of the largest autoloaded options should have a new column with a button to "Disable autoload".
  • When the user clicks this button, the option's autoload value should be set to 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 option perflab_aao_modified_options).
  • If the 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.
    • Important: This list must be displayed even when the check passes, as the user must at any time be able to revert a decision they made before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
2 participants