Question

What is the best way to increase the max file size in wordpress?

Posted April 24, 2015 4.4k views
WordPressDigitalOcean

Okay, I hope someone can help me out because I am out of ideas.

I need to increase the max file size on my wordpress website using the Digital Oceans console. I’ve changed the max file size using both the: sudo nano /etc/php5/apache2/php.ini command and the: sudo vim /etc/php5/fpm/php.ini command. All those managed to do is increase the max file size from 2M to 8M which, while is an increase, isn’t enough for the files I need for my site.

Is there something I’m missing, or something else I can do in order to increase the file size? I don’t have access to filezilla or anything like that so everything needs to be done through the Digital Ocean console.

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

Which web server you are using?

For php.ini
You should look for 2 config option post_max_size upload_max_filesize

For apache (/etc/apache/sites-available/[yousite]):
Check for LimitRequestBody directive (in bytes, 0 means unlimited)

For nginx, /etc/nginx/nginx.conf http block
Check for client_max_body_size
You should also check you site config files to ensure it is not overrided by in server & locatin block.

Hope this help.

Submit an Answer