Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Max filesize ubuntu 20.4, apache2, wordpress
Hi all. I followed the digitalocean tutorials for installing the core ubuntu 20.4 server, then installed lamp stack with apache2 and mysql to serve up Wordpress. I would like to change the max file upload size in php so I can upload bigger files. I’ve tried to do this where info.php points me to which is the php.ini file in /etc/php/7.4/apache2. Now the file says this:
Maximum allowed size for uploaded files:
; http://php.net/upload-max-filesize upload_max_filesize = 32M
I also created an info.php file to see where the core configuration files are coming from and its here. yet when I try to upload a file bigger than 2m in WordPress, I get an error that the max file size is 2mb and I cannot upload the file. These are smaller images I wish to test on a development WordPress install. The image is 4mb in size. the info.php file says this:
upload_max_filesize 2M 2M
Now I am not sure where this value is coming from since I edited the php.ini file that the info.php declares. I’ve tried a few other methods and even a plugin for Wordpress but this limitation has me stymied. I’ve done this countless times in the past on ubuntu and it just worked with a restart of apache2. I also rebooted the server just to make sure it’s okay.
Any pointers on where to look to adjust this 2m to 32mb for my testing and development work?
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.×