I have updated uploadmaxfilesize in php.ini (which is in the php_info()) and restarted the apache with

sudo service apache2 restart

But phpinfo() still showing uploadmaxfilesize as 2M. I even tried to restart the server but the same result. I changed the postmax_size but it is showing as 8M.

Can someone give solution to this?

1 comment
  • I have edited my php.ini file located in /etc/php/7.0/apache2/php.ini
    I have changed the “uploadmaxfilesize” value from 16mb to 32mb
    I restarted the server, and as a result, my php max upload filesize was updated.
    This was evident because i created a php info file in my /var/www/html and the changes reflected in in phpinfo.

    Did you edit the php.ini file in the right place? You have not specified any information regarding your setup. Wordpress may require changes to htaccess to increase upload size but you haven’t specified.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

You are changing in the wrong place inside php.ini, you must search and change the following, then restart apache.

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enablepostdatareading.
; http://php.net/post-max-size
max_size = 512M

best, max.

Submit an Answer