How to optimize wp_option table?

If you Google for “wp_options optimize” you’ll find some suggestions how to search for performance problems in wp_options.

It makes sense to check which option values are very big, using the following query. Then check if you really need the plugin that wrote this setting (or remove the setting(s), if the plugin already is installed). In some cases you can also fix that by changing a plugin’s (or theme’s) configuration:

SELECT *, LENGTH(option_value) option_size 
FROM wp_options 
ORDER BY option_size DESC;

It might be necessary to do a mysqloptimize on the table after removing the values.