massive bloating in 'wp_options' table!
-
phpMyAdmin tells me that there are ~200,000,000 rows in this table, amounting to about 150 GiB in size. But when I go to browse, I can only see 449 rows – the paging stops at page 15.
Where are the rest of these rows? And how can I get rid of them? My host is flagging this and I’m lost as to how to fix it…
-
Also – doesn’t look like there are any cron jobs going on.
I’m wondering if you have a bunch of undeleted transients in there
Please try this query in phpmyadmin
SELECT count(option_name) FROMwp_optionsWHERE option_name like '_transient%'If that’s a large number, you could delete rows where the option name begins with _transient or use a plugin like “wp-optimize” to remove them.
What are transients? See https://codex.wordpress.org/Transients_API
Thanks. Running that, I only get 37 transients.
I noticed that even though there are only about 450 rows, the ids jump around a lot and go up towards 86000 by the end. I’ve tried resetting the autoincrement and I get a table size of about 1.5 MB, but it quickly climbs back up in a matter of minutes into the hundreds of megs.
if things are happening that quickly, let’s assume that you have a rogue plugin or something. So, please disable all plugins and set the theme to twentysixteen and see if the problem goes away. (This leaves you with a vanilla WP installation.) If so, turn them back on one at a time until you find the one causing the problem.
If it’s a plugin or theme, then we can narrow the focus.
What are some of the table entries being added? Does the option_name provide a clue?
I disabled/deleted a few plugins, and reset the incrimenting again. In the past 20 minutes, there hasn’t been any bloat, so I’m cautiously crossing my fingers. I’ll check it again in a few hours to see, and will let you know. I really appreciate the help!
The topic ‘massive bloating in 'wp_options' table!’ is closed to new replies.