Php filesize limit 1 MB vs. 20 MB

Dear infinityfree-Team,

first of all I need to give you a big THANK YOU for your free hosting service. I am really happy to have that “for testing” and will maybe upgrade later once I know how my website will work.

Now the question, I can’t upload several php files, that are slightly > 1 MB. In the support topic, why files are deleted, the 1 MB limit is pointed at.

But: when I asked phpinfo, it’s giving me a max filesize of 20 MB (see screenshot below).

  1. Which one is the correct file size limit for php files? I guess it’s 1 MB (otherwise files won’t be deleted automatically),

  2. is it possible to increase the php filesize limit to 2 MB? :slight_smile: I guess you won’t do it (for me), but at least I want to ask.

Thank you again for your great service.

With best regards, Christian (currently from India)

2024-07-20 15_17_59-mts.rf.gd_phpinfo.php_i=1

Isn’t it possible to edit the post?

I just wanted to add, the file is deleted, regardless if I upload via FTP or the web explorer…

just ignore that 20MB file size limit configured in PHP as infinityfree servers have their own limits

HTML, PHP and JS files are limited to 1 MB
.htaccess files are limited to 10 kB
All other files are limited to 10 MB

so the largest file possible is actually 10MB or much less if its one of the standard file types


as a new user you will not be able to edit posts but this feature will become available to you with time (I forget why, number of posts ? possibly)

6 Likes

The PHP max_file_size setting controls to the maximum size of files that can be uploaded to your website using upload features on your website itself. That’s separate from the actual storage of files.

The higher upload size limit is mostly intended for cases where the uploaded file does not get stored as-is, like with theme or plugin installations, or files that get uploaded to external file hosting.

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.