How to fix very large WordPress database

WORDPRESS DATABASE VERY LARGE, TABLE WP_OPTIONS HUGE

We often read about WordPress databases suddenly blocking large disk space or tables “wp_options” alone growing to more than 100 Mb.  In these cases, a simple optimization of the table on database level solves the problem.

When researching the symptom for the first time, you will naturally find several articles that suggest a solution to this problem. The only issue is that all of these posts are looking for the cause in certain WordPress functions, some of which you don't even use or which were simply not responsible for the behavior on most cases we have witnessed.

In other posts, the autoload functions are often blamed for the too large database. Other posts recommend plugins for optimizing the WordPress instance.



Solved by optimizing the tables in phpMyAdmin

  • First we open our database in phpMyAdmin. On the top level we sort the contained tables by their size and identify the biggest space wasters:

  • Identify storage-hungry tables in the WordPress database

Attention: At the next step we can easily click wrong options and thus possibly delete whole tables. As a precaution I recommend to make a backup first.

  • Now we mark the largest tables of our WordPress database with a check mark in the selection box and now click on the drop-down menu next to the “Select All” button at the bottom of the screen.
  • Here we select the entry “optimized table”.

phpMyAdmin now optimizes the table, or recreates it cleanly, if direct optimization is impossible. In my case the table shrunk from 602 MB to a reasonable 1.5 MB.

Still need help? Contact Us Contact Us