What are the limits on uploading files?
The limits on uploading files are as follows:
- HTML and PHP files are limited to 1MB each
- .htaccess files are limited to 10kB each
- All other files not listed above are limited to 10MB each
Why are there limits on uploading files?
Because we provide hosting at no cost, we have to put limits on our services to help prevent abuse. Additionally, large files can often slow down both your website and other peoples websites hosted on the same server, so these limits are also in place to keep websites running as fast as possible.
Note that most website owners will never have trouble with these limits, and if you do run into them, see the section below.
How can I get around the upload limits?
You can reduce the size of your files by following the below tips. We do not change this limit for individual accounts upon request.
For HTML and PHP files
- Consider moving CSS and JavaScript to an external file
- Define variables for repeated text (PHP)
- Move information to a database
- Split your PHP file and use functions such as
include or require
- Remove unnecessary and duplicate code
- Minify your code (We provide an HTML minification tool in the client area)
For .htaccess files
- If you are blocking IP addresses, consider blocking IPs by range instead of individual addresses.
- Also note that it only takes a few seconds to change an IP address, so blocking users by IP does not work very well. You can remove these rules if you need to make your file smaller.
- If you are blocking malicious bots, you can remove those rules, we already do that for you.
- If you are using hundreds or RewriteRule’s, consider directing traffic to a PHP file and routing from there instead.
- If some rules only apply to a subdirectory, consider creating a new .htaccess file in the subdirectory and migrating the relevant rules.