My options table is 3.2 GB! I ran a query to delete transients (only 172 were there), and I repaired and optimized the table, but it barely made a change. How can I go about finding out what's making this table so huge?

I scanned the site with Wordfence and it came up clean. The site runs super slow, so I assume this table has something to do with that, but I don't know what to look for beyond the transients.


  • Do you have huge number of rows too? I've e.g. seen a plugin store large sitemaps xml in the options table.
    – birgire
    Apr 26 '17 at 21:13
  • @birgire, there are 5,193,111 rows. Crazy.
    – LBF
    Apr 26 '17 at 21:18
  • I guess I would try to briefly scan it (manually or with sql) to find out what kind of options are exploding in numbers.. Then figure out if it's core, theme or plugin related.
    – birgire
    Apr 26 '17 at 21:23
  • Just tried the plugin "Delete Expired Transients" to see if I missed anything, and it found 2.5 million "obsolete woocommerce sessions from 2.4 and earlier" so I am deleting those now.
    – LBF
    Apr 26 '17 at 21:24
  • 1
    Remember to backup before testing/deleting anything from your db!
    – birgire
    Apr 26 '17 at 21:25

Check out this thread wp_options is GB in size My wp_options table dropped from 670GB to 13.5MB after running the optimization commands they outlined


As per the poster, the problem was woocommerce not discarding sessions from the options table after they have expired.


There may be different reasons your DB being too heavy. Have you being tried with cleaning your DB with wpoptimize plugin? This might help you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.