Huge “WP_posts” table ~8.7Gb mainly post_type “http” – pls help!
-
Hi WP community!
This is my first post but I am in need of some reasonably urgent assistance but would like to understand what’s happening! So I turn to those who may have come across this before and cross my fingers. I hope that I can get help and that this information will help others in the future.
I have noticed our host’s disk space allocation filling up disproportionately to the size of the website and its content. The
WP_posts
DB table is quite large, listing 6.8Gb. The post_type taking up the majority of that space is “HTTP”. Our site is relatively small, with only ~150 pages at the moment.Here is the result of an SQL query showing the sheer number of post_type Http:
post_type Rows Data_in_MB
HTTP 392010 6786.99
page 67 1.58
elementor_library 149 0.67
attachment 1433 0.52
product 52 0.19
product_variation 220 0.07
nav_menu_item 316 0.06
custom_css 2 0.04For the interest of anyone reading this post who might be running into the same type of issue, I ran the following SQL CLI to produce the above:
SELECT post_type, COUNT(*) AS <code>Rows</code>, ROUND( SUM( LENGTH( CONCAT( ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, guid, menu_order, post_type ) ) )/1048567, 2 ) AS <code>Data_in_MB</code> FROM wp_posts GROUP BY post_type ORDER BY <code>Data_in_MB</code> DESC;
I obtained the above from the extremely handy Deep Clean SQL DB post.
I have run numerous Database optimization attempts using WP DB and optimization plugins that have not cleaned up any of the space as hoped. I presume the records are still regarded as required or aren’t considered problematic. Here are the plugins I have attempted:
- Advanced Database Cleaner
- WP Optimize
- Wp Rocket
- … and more
I was using Simple History, which was regarded as a program that was filling up others’ storage with logs in another forum post (that I’ve lost for now), but I have since removed it as well as cleaned out any logs. Simple History was great, but I need to find the culprit.
Given the DB size, I am unable to open it using free editors like RazorSQL or text editor on my MAC to view each entry in text format to identify what they are or what’s causing the issue.
I will add more detail if I remember more but hope that’s enough for someone to have an idea of what’s causing this.
I look forward to an informed response.
- The topic ‘Huge “WP_posts” table ~8.7Gb mainly post_type “http” – pls help!’ is closed to new replies.