File Size Issue


I’m trying to upload a 62.5 MB PDF file to a page on Kirby, and the result is “file missing”.

I search the forum, and discover some hints.

I change php.ini, variable upload_max_filesize = 70M

I restart apache (httpd -k restart), and check the configuration above with phpinfo. Everything ok , 70M.

But the error persist in Kirby.

Any next steps?

Thanks in advance!


I use Nginx instead of Apache and besides setting the size limit on the php.ini file I also have to add this line to the Nginx config file:
client_max_body_size 70M;

Search if there’s a relevant option for Apache.

1 Like

You should also check

  • memory_limit and
  • post_max_size
1 Like

You’ll also need to restart both Apache and the PHP-FPM process.

I do not have a post_max_size in my php.ini. I need to create a line with it?

And what values I set in memory_limit?


Pedro, thanks for the answer.

I do not know much about php-fpm process. I do a quick research, but I will need more time to understand it.

But if the info returned by phpinfo command shows upload_max_size as 70M, I still need to restart this PHP-FPM?


From the manual:

post_max_size integer
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used.

If it doesn’t exist, you can create that line.

You can set post_max_size to 0 to allow unlimited post size.

Problem Solved.

Simple Steps:

  1. Change upload_max_filesize from 2M to 70M in php.ini
  2. Include a max_post_size line and set to 70M in php.ini [Thank you very much, texnixe!!]
  3. Restart Apache with httpd -k restart

Thank you all! Always quick feedback and excelent support!


1 Like

Hi, apologies for reviving this but I’m running into a similar issue.

I’m attempting to upload files that are roughly 5-7mb in size, and when doing so I see an error in the DevTools that states:

{"status":"error","code":5,"message":"The file is too big. The maximum size is 2 MB in file: \/Users\/blahblah\/Documents\/Code\/clientxyz\/Web\/kirby\/vendor\/getkirby\/toolkit\/lib\/upload.php on line: 198"}

I’ve read some of these forums and can not find any php.ini file in my Kirby set up.

I did attempt to update the blueprint with this, as found in Kirby 2 docs (I can’t seem to find that same doc after the Kirby 3 update) :

  sortable: true
  size: 10485760
      label: Title
      type: text

Any suggestions are welcomed, thank you

The php.ini is not in the Kirby setup, it is somewhere on your server. Often, hosting providers offer a control panel where you can set those things or they tell you somewhere in the docs how you can edit the php.ini.

Where do you host the site?

Thank you for your quick reply.

I realized it was an issue with my local server on the command line, which I was able to resolve by just moving the files via Finder.

As per where the site is hosted, my client is set up on GoDaddy and I’ve confirmed that the file upload works as intended via the browser. False alarm, thank you!