Question

Upload Max Filesize WordPress stuck at 2M - PHP7.4/Ubuntu 20.04/Apache2

Posted August 13, 2021 108 views
ApachePHPWordPressUbuntu 20.04

I just recently created a new droplet running Ubuntu 20.04, Apache2, and PHP8.

I then added PHP7.4 and disabled PHP8.

This led to limit upload file size of 2M.

I modified the upload_max_filesize, post_max_size, and max_execution_time inside of

$ sudo nano /etc/php/7.4/apache2/php.ini

However, the WordPress Site Health Info still indicates that the Upload max filesize is 2M.

I’m pretty much just walking in the dark without really knowing how to fix this and would truly appreciate anyone who could guide me through the steps to solving this issue.

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.

×
Submit an Answer
1 answer

Hi @mattverick,

It’s possible your WordPress installation is using another PHP.ini and not the one that you are using. What I’ll suggest is creating a file called info.php with the following contents:

<?php

phpinfo();
?>

Create the file in your WordPress directory and load it in the browser. It will tell you which php.ini you are using and where to make the changes.