Knowledgebase

Is there a limit on the number of files a directory (folder) can have?

 

If you are planning on loading large amount of files into a single directory, you might rethink your strategy in how your store a large amount of files on your web site.

To keep your site responding at its fastest and keep server load to a minimum, you should have large amount of files (any directory that has over 500 files) divided into sub-directory's (sub-folders). This is for ANY type of file whether it be html files, jpg's, gif's, mp3's, pdf's, doesn't matter the type of file, work your site structure plan to use sub-directory's if you plan on having a large amount of files.

The problem you will run into with large directory's...
1) If the directory is large enough the FTP server might not be able to respond,
2) Your FTP software (Client) will not be able to display the files or lock up or fail to respond,
3) You will increase the server processing time, making you a server "resource hog" and making for a bad neighbor to the other sites sharing the same server.
4) When you start to use excessive server resources you are causing the server to use extra energy.

A good rule of thumb is to never have more than 2,000 files, 10,000 absolute tops in any given directory. And really you should start adding sub directory's when your directory is reaching the 500 file mark.

View this KARTHOST Knowledgebase article to determine how many files are in a directory Determine number of files in any given directory(folder)

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Characters like Â, ’ are showing up on my web site page

This problem is generally related to the wrong text encoding that is being supplied to your...

How does one run a PHP script as a CGI?

#!/usr/bin/php -q< ?//php source here?>The PHP script needs to be given permission (chmod)...

Are Server Side Includes allowed?

Server Side Includes (SSI) are allowed on KARTHOST.com servers. However you must modifiy your...

Determine number of files in any given directory(folder)

You must be logged on as SSH via line command (a good SSH line command utility is PuTTY,...