Take the 2-minute tour ×

I run a MediaWiki wiki page. It uses MySQL. I have just 20 wiki pages and yet the wiki_text table is 45 MB big. I had security holes and spam bots were posting spam wiki pages.

I have manually deleted all spam messages and closed the security gap.

But I don't know how to minimize back the wiki_text table size.

share|improve this question
How about reading the manual? –  mailq Oct 1 '11 at 22:49
even after running "optimize table wiki_text" the table is still 45 MB. Being all BLOB fields I cannot see its content but I suspect 20 micro pages cannot occupy that many disk space. –  Gad D Lord Oct 1 '11 at 23:03
So then there are more than 20 entries in that table and you didn't delete the pages in the database. –  mailq Oct 1 '11 at 23:14
add comment

2 Answers

I'd suggest looking into the official Mediawiki support channels. They probably have a forum, mailing list, etc.

I haven't used Mediawiki in quite a while, but my recollection is that if you delete pages through the web GUI, they just get marked as "deleted" in the database (and thus are not displayed), but the actual content still exists in the database. This allows for pages to be undeleted if they were deleted mistakenly.

You need to open up your wikipedia database in something like MySQL Administrator, Sequel Pro, or the like. That will give you the ability to see what all the content in the table is. Then you can look up the database schema to see what (if any) ramifications there would be to just deleting the rows directly from the database.

share|improve this answer
add comment

There is an official topic on the subject


Read http://kb.linuxvirtualserver.org/wiki/Purge_spam_revisions_from_mediawiki_database_permanently

share|improve this answer
Please edit your answer and provide content here. It's fine to link to a page for more details, but we prefer that you provide some useful content here, perhaps a summary. –  EEAA Oct 2 '11 at 21:41
add comment

Your Answer


