Skip to content

Instantly share code, notes, and snippets.

@jb510
Created April 3, 2017 21:13
Show Gist options
  • Save jb510/206de7fb03da2bae51941251fc26215d to your computer and use it in GitHub Desktop.
Save jb510/206de7fb03da2bae51941251fc26215d to your computer and use it in GitHub Desktop.
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment