Question

File Upload too large

I need to upload a video which is 20MB and the max upload is 8MB.

I followed the instructions by changing the post size and upload file size in php.ini to 32M.

I restarted the service and I rebooted my server, but I still cannot upload my 18.9MB video, any idea?

The site is WordPress.

Alan.


Submit an answer
Answer a question...

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.

alexdo
Site Moderator
Site Moderator badge
October 2, 2022

Hello @ascobie11

You can also check which is the configuration file - php.ini that is currently used and apply the changes there (if the site using the global php.ini file and you change the values for these settings this will make the changes globally for all sites). Ideally, you would like to have the following values (for performance, laregr files meaning more to execute and more resources allocated to this process):

  1. upload_max_filesize = 64M
  2. post_max_filesize = 64M

However, you can always adjust the values to your exact needs

You also need to restart your web server in order for the changes to take effect.

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
October 2, 2022

Hi there,

Usually, there are multiple php.ini files, and it is important to make the change to the correct one. I could suggest the following:

  • Create a file called info.php inside your WordPress directory with the following content:
<?php
phpinfo();
  • Visit that file via your browser and search for the php.ini path

That way you can verify which is the correct php.ini file that you need to make the change to.

After that make the change to the file and restart your Apache service.

Let me know how it goes!

Best,

Bobby

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.