Report this

What is the reason for this report?

The uploaded file exceeds the upload_max_filesize directive in php.ini.

Posted on November 1, 2014

Trying to add a theme that I downloaded for Wordpress but when I try to upload it, it states the following:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

How do I fix this?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

By increasing upload_max_filesize in your php.ini.

You might have different versions of php.ini files in your installation. To check which one you should be altering its upload_max_filesize line, use:

php -i | grep "Loaded Configuration File"

Then do a

sudo service nginx restart

I bumped into exactly the same problem few days ago. The solution I found was adding the following lines to php.ini in the root directory of the Wordpress install.

post_max_size = 16M
upload_max_filesize = 16M
memory_limit = 128M

However, the system didn’t seem to honor the settings. Instead, editing /etc/php5/fpm/php.ini solved this problem for me.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.