By shanelharder
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.
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!
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.
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/
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.