jon-b
4/3/2017 - 9:13 PM

WordPress check and then force disable autoload in wp_options

WordPress check and then force disable autoload in wp_options

# Useful to inspect first
# Return autoload options ordered by length/size
SELECT LENGTH(option_value),option_name FROM wp_options WHERE autoload='yes' ORDER BY length(option_value) DESC LIMIT 20;

# disable autoload on all options
UPDATE wp_options SET autoload='No' WHERE autoload='Yes';

# re-enable autoload on first 100 options
UPDATE wp_options SET autoload='Yes' LIMIT 100;