PHP post_max_size vs upload_max_filesize, what is the difference?

You are correct. post_max_size is the maximum size for all POST body data. It doesn’t matter if you’re POSTing JSON or your DVD collection, this is all POST body data. Your file upload counts towards this limit. You should also be aware that if you are uploading multiple files, the total file size has to fit within this limit.

upload_max_filesize is a maximum size only for files that are POSTed. Other types of POST body data are not subject to this limit.

In short, if you want to upload large files, you must increase both limits.

Leave a Comment