A lot of new users are facing this upload_max_filesize issue in PHP. We will overcome this issue by simply follow these steps.
These steps for the php7 version on ubuntu 18.04. Let’s get started.
- sudo nano /etc/php/7.2/apache2/php.ini
Step:2 search for upload_max_filesize and increase 2mb to 100mb,post_max_size 8mb to 100mb and max_execution_time 30 to 300.(all these changes are made up to your needs)
Step:3 Restart the server by entering the below command.
- sudo service apache2 restart
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!
@InternetGod1 Thank you for sharing this.
After executing this command for PHP7.4 on Ubuntu 20.04, I changed the sizes, the execution time, and restarted the server.
However, my Wordpress Site Health Info still indicates that the Upload max filesize is 2M.
Am I missing something?
This comment has been deleted
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.