Reduce install size

Ansatsu

Joined: 2005-09-24
Posts: 7
Posted: Tue, 2007-09-25 20:10


Gallery version (not just "2"): 2.2.3
PHP version (e.g. 5.1.6):
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):
Database (e.g. MySql 5.0.32):
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 2.0):

First of all, I like gallery2 very much, the only problem is the large number of files, like 13000 (archives+folders), after the installation.

From my host:

Quote:
The use of more then 50,000 INODES will result in account suspension. Accounts found exceeding 50,000 INODES will not be backed up on our backup servers. A INODE is the actual file or directory and not the size of that file or directory. For example your index.html file is 1 INODE. A directory called homework is counted as 1 INODE as well.

As you see, I really need to reduce that number. I only use english language.

Which files can I safely delete?

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Tue, 2007-09-25 21:03

1) Delete any modules in ./gallery2/modules that you don't use, make sure they are deactivated / uninstalled first. You might even be able to hit "delete" from right there, can't remember if it works for sure. That is in site admin, plugins btw.

B) Delete any themes you don't use in ./gallery2/themes, of course making sure they aren't activated (uninstall them!). Might be able to delete from the same place as above.

III) In each module, there are lots of .po and .mo files in each module/po directory (ie: ./gallery2/modules/uploadapplet/po). You should be safe to delete any languages you *don't* use, but you can see this could quickly be time consuming. If you have shell access, you could do something like `find . -name 'es.*'` to see all the "es" language files (is that spanish?). You could expand the find request until you are happy with the results (say, using regex) then add a "-delete" or "-exec rm '{}' ';'" (depending on which it supports) to nuke all those language files. You might have to repeat it a few times with different file names specified so you can get them all w/o removing the languages you want to keep. This should save a lot of files too.

Lastly) You might consider de-activating all your modules, downloading the latest "minimal" release and blowing away your ./gallery2/ dir (after making a backup of course), copying the "config.php" from your backup and then making sure everything is going. Now, using the downloadable plugins, you can get modules with *only* the languages you want. Be sure to have that backup, cause I've never done this and my directions may not work, they are just a guess. One way I might achieve what you desire.
_________________________________
Support & Documentation || Donate to Gallery || My Website

 
Ansatsu

Joined: 2005-09-24
Posts: 7
Posted: Tue, 2007-09-25 21:21

Thanks a lot fryfrog, extremely helpful.

I will do exactly as you said.

:)