Created
April 3, 2017 21:13
-
-
Save jb510/206de7fb03da2bae51941251fc26215d to your computer and use it in GitHub Desktop.
WordPress check and then force disable autoload in wp_options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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