upload_max_filesize in php.ini (one more time)

April 25, 2015 12.8k views
Apache WordPress Ubuntu

Hello! I've created one click instalaltion.
So now I have problem with chfnging uploadmaxfilesize in php.ini.
I've found 2 files using: find / -name php.ini


Then I've changed uploadmaxfilesize and restarted apache using: sudo service apache2 restart

But problem is still exists. Please help!

1 comment
  • From the command line you can run:

    php -i | grep "Loaded Configuration File”

    This will tell you the location of the php.ini file you will need to edit.

3 Answers


I have just set up PHP5 on my server and took a look into your issue. I am using Apache2, so the correct configuration file is located under:


I would prefer to use nano for editing text-based files. When you will you open this file, press on keyboard CTRL+W in order to search "uploadmaxfilesize" (without quotes). Make sure that it is not doubled in any way. Set it for example 1024M.

upload_max_filesize = 10M

Always, when I am editing this value, I do it for another one so I do not get any complications in the future:

post_max_size = 10M

After you will edit these two variables. Push CTRL+X on keyboard and type "y" so it will save. Since you have changed php.ini file, the restart is required, make it using following command:

service apache2 restart

I hope that it will work in your case, same as mine. Also, remove your changed from php.ini under /cli/ folder. I am using ubuntu 14.04. I recommend to do basic .php file check with phpinfo(); inside in order to check if changes applied.

Regards, slajd77

hi i edited both uploadmaxfilesize and postmaxsize = 10M in /etc/php5/apache2/php.ini. However the problem still exits. Please help

Have another answer? Share your knowledge.