Skip to content

Instantly share code, notes, and snippets.

@mommaroodles
Last active December 9, 2024 15:55
Show Gist options
  • Save mommaroodles/e739f710c218c937a712d82e85da5747 to your computer and use it in GitHub Desktop.
Save mommaroodles/e739f710c218c937a712d82e85da5747 to your computer and use it in GitHub Desktop.
mySQL - Check autoload size in wp_options table - detailed
SELECT 'autoloaded data in KiB' as name, ROUND(SUM(LENGTH(option_value))/ 1024) as value FROM wp_options WHERE autoload='yes'
UNION
SELECT 'autoloaded data count', count(*) FROM wp_options WHERE autoload='yes'
UNION
(SELECT option_name, length(option_value) FROM wp_options WHERE autoload='yes' ORDER BY length(option_value) DESC LIMIT 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment