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

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.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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:



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.