I've been trying to increase the maximum upload size of my Wordpress instance, and I've already tried all methods mentioned in the results I get when searching this issue.

I've tried changing the php.ini file, the .htaccess, the wp-config.php, etc. and it's still doesn't change from 2MB.

This might be important:
If I run php -i and find the upload_max_filesize, it shows up with the increased value, but when I print a phpinfo();, it displays the default 2MB, even though both display the same path in "Loaded Configuration File".

Do you have any idea on what I'm missing? It's getting very frustrating.
Thanks in advance

  • When you changed your php.ini file did you restart the Apache process?
    – Kinnectus
    Feb 6 '19 at 15:26
  • What are your php.ini values for upload_max_filesize and post_max_size?
    – Kinnectus
    Feb 6 '19 at 15:27
  • @Kinnectus I did restart. upload_max_filesize is 256M and post_max_size is 256M also Feb 6 '19 at 15:43
  • Also, you say you changed php.ini yet when you run phpinfo it doesn't show the updated value. As MrNiceGuy points out it could be permissions on the file OR, if you look at the phpinfo output, you may have edited the wrong file? Make sure the file is the one identified in phpinfo...
    – Kinnectus
    Feb 6 '19 at 15:48
  • Have you checked in the WordPress dashboard, Settings, the value of “Max upload file size”? You may also change it here.
    – harrymc
    Feb 6 '19 at 19:03

So you checked phpinfo() for Loaded Configuration File, made the appropriate changed to memory_limit, post_max_size, and upload_max_filesize, then restarted Apache and... nothing changed.

Try comparing the outputs of:

php -i | grep -E "Loaded Configuration File|memory_limit|post_max_size|upload_max_filesize"


lynx -dump (URL of phpinfo.php) | grep -E "Loaded Configuration File|memory_limit|post_max_size|upload_max_filesize"

You may find that phpinfo() and php -i are loading different configuration files, and that you've changed the only one.


If your changes to the php.ini and wp-config.php are saved correctly, check file permissions/ownership. Make sure your web user can make use of the file.

  • I've already checked, all files have read permissions for everyone and are in the same group as the web user. Feb 6 '19 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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