How do I increase the max file upload size in wordpress? I’m using Ubuntu 12.04 and the LEMP stack. I think it’s a PHP thing but I’m not 100% sure.
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.
Most likely you are using PHP-FPM with Nginx, so you would edit the php.ini file <br> <br>e.g. To change max file upload size to 100MB <br> <br>Edit… <br>vim /etc/php5/fpm/php.ini <br> <br>Set… <br>upload_max_filesize = 100M <br>post_max_size = 100M <br> <br>Also add following line to http{…} block in nginx config: <br> <br>http { <br> #… <br> client_max_body_size 100m; <br> #… <br>} <br> <br>Source: https://rtcamp.com/tutorials/php/increase-file-upload-size-limit/
first run this command sudo find / -name “php.ini” then after finding the file run this command nano /etc/php/7.0/fpm/php.ini after you are in the file click Ctrl w to search for upload_max_filesize . After setting the value to 100M save it clicking Ctrl O and then click Ctrl X.
I think this might be useful for all of you. First run
So that you can find all php.ini files no matter what you are using. Then make all changes as needed
Am using ubuntu, how do i edit this file on my server
The file does not allow edit? tried with ! too, but does not work
Can someone help step by step To change max file upload size
Thanks for an awesome answer! <br> <br>I think I’m using fastCGI and not PHP-FPM though. Is that likely or am I completely not understanding how the system works? I followed the LEMP stack tutorial here on Digital Ocean so whatever that installs is what I’m using. Would you mind sharing what to edit if that’s the case? Also, how would I check that? Sorry for such noobish questions, trying to learn a lot really fast.