I have had to reinstall my wordpress install. In order to add the content back I need to get my max_upload_filesize increased to at least 500M. I have went to every php.ini I can find and increased the size. I have even done that in the .htaccess file. When I go to media panel to upload I still have a hard limit at 2M. Where do I need to make the change?

  • Maybe overridden somewhere using ini_set(). – kaiser Feb 8 '17 at 20:22

Do you by any chance didn't run sudo service apache2 reload or sudo service apache2 restart after making the changes on php.ini? To find out which php.ini you should update, run command php --ini.


The php.ini file has to be in your root folder.

If modifying the php.ini and .htaccess doesnt work, you can try to add the following code to your functions.php file:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Not sure if the last one is good practice, but some people achieve it this way.

If all the 3 cases doesnt work, then you are most likely on a shared hosting package.

In this case my advice is to contact your web hosting support. In most cases, the support could do this for you.


I've used the "Upload Max Size" plugin to easily do this (although you do have to enter a byte- value rather than something like "5MB"). Works well for me, and easy enough (although you can do it by settings in config files).

Plugin here https://wordpress.org/plugins/upload-max-file-size/

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