0

I have php.ini files in the following directories of my WordPress installation:

  • /wp-admin
  • /wp-content
  • / (where there wp-config.php lies)

In all of them I set upload_max_filesize = 640M; - 640MB is the maximum value that is allowed by my provider in my package (I called).

memory_limit = 268435456;
post_max_size = 67108864;
upload_max_filesize = 640M;

I did NOT configure an upload_max_filesize in wp-config.php or in .htaccess. I confirmed this value with phpinfo() and with ini_get('upload_max_filesize').

Nonetheless, WordPress displayes 64 MB as maximum on the media upload page and on the WooCommerce status page.

I am utterly puzzled. I checked every post on stack but I couldn't find an answer to that dissonance. Help would be much appreciated.

upload page WC status

0

2 Answers 2

1

UPDATED:

I figured out the following by playing with the numbers in the php.ini in /wp-admin:

The add upload page in the admin area seems to always display the lower value of either post_max_size and upload_max_filesize.

In my case, post_max_size was lower than upload_max_filesize which is the reason for "Maximum size of files for uploads" not displaying the 640MB but 64MB.

I suppose this has to do with this: see php.net docs as:

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.

2
  • If you add other things to your question update it, this is not answer. Commented May 3, 2020 at 13:42
  • Why is this not an answer? It explains why the values from my questions do not match.
    – jasie
    Commented May 3, 2020 at 13:44
-1

upload_max_filesize for uploading file from multipart-form. Other hand post_max_size is posted size from form. (input textarea etc). So i prefer, create php file in root directory such as php.php and write phpinfo for real compare.

<?php
phpinfo();
5
  • As I said in my question, I already did read the entries of phpinfo().
    – jasie
    Commented May 3, 2020 at 13:02
  • ok this is only for healthy comparison. I explain different between upload_max_filesize and post_max_size Commented May 3, 2020 at 13:08
  • I am sorry but your answer is not a good one in my eyes. It is difficult to understand due to missing practical context and and it lacks external sources.
    – jasie
    Commented May 3, 2020 at 13:17
  • OK you are hero :) I explain to you difference between upload_max_filesize and post_max_size so my answer is clear, if you want to external resources just search in php.net. I want to help you you give me downvote. Thank you Commented May 3, 2020 at 13:39
  • Why? Irony is utterly useless on Stack IMHO. It was not me who downvoated, btw.
    – jasie
    Commented May 3, 2020 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.