The Maximum Upload Size in WordPress is the maximum size of a file that you can upload to your WordPress website using your WordPress dashboard. If you want to increase it to a certain number because you got some warnings like “maximum.mp4 exceeds the maximum upload size for this site,” this article could help you.
Find out the Current Maximum Upload Size
Before you make any changes to the maximum upload size, you should check the current maximum upload size of your WordPress website. In order to do that, head over to Media > Add New section on your WordPress dashboard. It will show you the current maximum upload size of your website.
If you want to upload a file with a size larger than the given number, you can go ahead and follow these methods to increase the maximum file upload size in WordPress.
Make sure to replace the values such as ’64M’ with the appropriate file size. The execution tile is in seconds. 300 seconds will be converted into 5 minutes.
1. Using functions.php
This won’t work in every theme. But if it does, it is the easiest way to increase the upload size. Just add the following code to your functions.php file.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
2. Using php.ini
You can edit/create a file called php.ini in your root folder and add the following code to it.
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
3. Using .htaccess
Open your .htaccess file in your WordPress root directory and add this code.
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
4. Using a Plugin
There are few plugins available in the WordPress repository that allows you to increase the maximum upload size. This is one of them.
5. Using your Hosting Settings
In certain hosting providers such as Cloudways, you could increase the maximum upload file size right from the hosting dashboard. If you see an option for it in your dashboard, you could use that as well.
After making the changes, you can revisit the media upload page and verify that the changes have been taken place. Now upload the large file to your WordPress site.