Hello. WordPress site health status is suddenly showing this recommended improvement:
“The settings for post_max_size and upload_max_filesize are not the same, this could cause some problems when trying to upload files.”
I don’t even know where the settings for both are, so I have no idea how to make them the same. I’m hoping somebody here can help. Thank you.
Hello. Thank you for all your help. Sorry I don’t have much knowledge about this so I wanted to confirm.
In my case, post_max_size (260M) was indeed set greater than memory_limit (256M) when I looked. So it’s all right that I tampered with the php.ini to reduce post_max_size to the same value as memory_limit, right? That won’t cause any problems?
Hey their gorgeouskitty I want to thank you for helping me solve your issue. I had the same problem you did and a Google search found your question. I called Bluehost who hosts my sites and literally 9 minutes later my problem was solved. her’es how you fix it!
1. Log into your cPanel
2. Under Software click the icon for Multi PHP INI Editor
3. In the Drop Menu for Select Location choose your domain name
4. I made both my max post size and file size 512M
5. Click Apply
6 Go back to your Site Health and rejoice knowing that you may have 99 problems but a PHP INI setting isn’t 1 of them any longer
I also made that change and it worked!!!
But it says ” 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.”
Which means to me that the change shouldn’t be made?
For me, making any or all of these changes did not affect the site health. This mismatch still shows up as a recommended improvement. However, I also have an active PHP session, so that is maybe affecting me? Initially my php.ini file did not specify any of this. I am making the changes with an editor using PuTTY.
Like @diondesigns said, it’s a bug with the Site Health tool. The message appears whenever
upload_max_filesizeare not equal. But in fact the message should only appear when
post_max_sizeis smaller than or equal to
For those interested, here you can read what the PHP manual has to say about the proper relative values for
What it boils down to is that
memory_limitshould be larger than
post_max_sizeshould be larger than
Thanks for the feedback. I must have something else going on and I will suppress my OCD until the site health tool is fixed. I don’t get many people uploading to the site anyway.
For what it’s worth, here is where I went wrong: the cPanel settings to which @darkwatergroup11 refers overrides whatever you place manually in the php.ini file. Setting limits within the php.ini file has no effect. Making the changes in cPanel as he says fixes the site health recommended improvement. Thanks everyone.
Yes, that’s exactly how I did it, except I used 256M instead of 512M.
Originally, I found that both memory_limit and upload_max_size were at 256M, but post_max_size was 260M. I merely changed post_max_size to 256M so it wouldn’t be greater than the memory_limit. 🙂
And what if, like in my case, both values are exactly the same but WP still shows that warning in the Site Health section. I have checked my configuration in my server’s panel and both are stated as 25M
Thanks to all of you for this useful discussion. I’m having a similar problem.
So I went to MultiPHP INI Editor, and found the following…
MEMORY LIMIT 25600M
upload_max_filesize 25600G [G not M]
Yes, that’s right G not M. Does G stand for GB and M for MB? If so, I’ve got a big mismatch. This maybe started when I couldn’t upload a 2.2 MB file and I asked the Bluehost rep to help. (They don’t always know what they are doing.) S/He assured me it was now big and I could upload any file.
So should I set it all to 25600M?
Can I make it bigger if I want?
Can I make these settings as big as I like.
- This reply was modified 1 year, 9 months ago by mnatseah624.
I see one person writing that they changed them both to 2560M and another writing that they set them both to 25M.
I don’t know where they got those values from but I changed them both to 256M and the health warning concerning this disappeared.
However, I am still confused about the notation saying “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.” if true, brings back the site health error again.
Do G and M mean GB and MB
Should memory_limit be bigger than the other settings?
Can I make these settings as big as I like?
It appears you can make the setting as big as you like. whether or not it will work is another story. The guy I spoke to at Bluehost had a great point when I asked him that same question: Do you think you’d ever need more than 512? Try it out whatever size you want to see if it works. If it doesn’t work you know that 512 does.
@gorgeouskitty I did what you did and its fixed now! You can close.
No, you cannot!
Could @spartelfant or any other with knowledge let me know why I have the warning even with the same number (25M) in both values?
Sorry for insisting, but I don’t want my message getting buried under other comments not directly related to this issue.
- The topic ‘Mismatched “post_max_size” and “upload_max_filesize” values.’ is closed to new replies.