[Mediawiki-l] How to reduce database size

Rob Church robchur at gmail.com
Mon May 1 14:55:25 UTC 2006


On 01/05/06, Andy Roberts <aroberts at gmail.com> wrote:
> I'm running close to a limit of mySQL database size for the level of
> hosting service I'm on.
>
> I bet there's some unused records in there taking up unnecessary space.
> Can anybody suggest an easy, safe way of compacting the database
> somehow please?

You've had the "for the love of God, upgrade!" note, so let's get to a
possible solution. There are two methods of compressing the database.
One is to erase all old revisions of all old pages. This is quite
destructive, but might work in some cases. The script to do this is
deleteOldRevisions.php and is found in the maintenance directory.

The other, and safer, method, would be to run the compressOld.php
maintenance script, which can be found in maintenance/storage. There
are lots of little switches for customising this, but the defaults
work fine.


Rob Church



More information about the MediaWiki-l mailing list