rainer23
Member
Posted 1 year ago #
The first 18 month the database of my blog grew from 6 to 12 to 16 MB. Now from last August till now, 6 months, it grew to 125 MB. I have plugins like Akismet, "Bad behaviour", WP-Spamfree, Secure WordPress. Something must be causing this big grow? Akismet says, 7,667 spams caught, "Bad Behaviour" says, 731 access attempts in the last 7 days. If those thousands of actions are documented in the database, is there anywhere a cache which can be emptied? Thanks for any help!
You should use phpMyAdmin or a similar tool to look at the database and see which table(s) are the largest. The names of those tables should help you determine which plugin is the culprit.
rainer23
Member
Posted 1 year ago #
Thanks vtxyzzy, it is wp_posts.
Problem was that each time a post is corrected the revision is saved in the database. When you make this e.g. 5 times per post, the whole post is saved 5 times in the database.
I have 3300 posts and at wp_posts it said 121 MB. Since I made regular database backups I noticed that the database jumped from August 2010 with 16 MB to 120 MB six months later.
So I went to phpMyAdmin and entered DELETE FROM wp_posts WHERE post_type = "revision"; . This deleted all those saved revision files from my database. Then checked again the size, it has 21 MB now what is quite acceptable.
You can use the Revision Control plugin to set the maximum number of revisions per post, or even turn off revisions.
rainer23
Member
Posted 1 year ago #
Thanks vtxyzzy, I installed delete-revision.1.3.1, revision-control.2.0 but somehow this did not delete the past revision entries in the database, wp_posts remained at 120 MB. Only by doing a query directly in MySQL it worked for me. Of course entering SQL statements one should be aware of the risk.
You can configure how many revisions to keep per post in wp-config.php - http://plugins.trac.wordpress.org/
rainer23
Member
Posted 1 year ago #
Thanks Joseph, I tried that but I had already 3300 post with 4-5 revisions on each post on my blog. When trying plugins like delete-revisions the database remained at 120 MB. Only when doing a DELETE FROM wp_posts WHERE post_type = "revision"; query the past revisions were deleted. Now my database is at 21 MB what is quite ok for 3300 post and 1000 comments.