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. If you are wondering what this error looks like, below is a screenshot showing the error while trying to upload an mp4 file to the WordPress media library.
Why should you increase the maximum upload size?
You can increase the maximum file upload size in WordPress to gain access to uploading videos and other big files to your WordPress website. The web hosting provider limits the maximum file upload size to a small amount by default. The amount depends on the provider. For some of them, it will be as low as 2MB which is clearly not enough to upload some high-quality images or other kinds of files. In this article on How to increase the maximum file upload size in WordPress, we are giving some methods to increase the maximum file upload limit in WordPress.
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.
Note: In this tutorial, we are increasing the maximum upload limit to 64MB. Make sure to replace the values such as ’64M’ with the appropriate file size if you prefer other values. The execution tile is in seconds. 300 seconds will be converted into 5 minutes.
Methods to Increase the Maximum File Upload Size in WordPress
There are several methods you can follow to set a higher limit on the maximum file upload size. What method you should follow will depend on your own choice and configuration.
1. Using Theme Functions File to Increase the Maximum File Upload Size in WordPress
This won’t work in every theme. But if it does, it is the easiest way to increase the upload size. Simply add the code below to the functions.php file of your theme to increase WordPress maximum upload size.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
2. Create or Edit an existing php.ini file to Increase the Maximum File Upload Size in WordPress
If you have a php.ini file in your root folder. Edit it to look like the below code or add it to the file. In most cases, if you are on a shared web hosting, you will not see a php.ini file on the root folder of the website. If so, create a file with the name php.ini and add the code given below. After this, upload it to the root directory of your website. This might help you to tweak the WordPress file upload size limit.
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
If the 64MB method not working, try 10MB. It may work sometimes.
3. Using .htaccess Method to Increase the Maximum File Upload Size in WordPress
You can simply edit the .htaccess file on the root folder of the website and add the below code to increase the upload limit. If you don’t have a .htaccess file, create one and add the code (check the default .htaccess for WordPress.) This also helps you to increase the maximum file upload size in WordPress.
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
These methods may not work if you are on a shared web hosting account. In that case, you need to contact your web hosting provider to increase the maximum upload limit of your files. They can definitely help you.
4. Using a Plugin
There are a few plugins available in the WordPress repository that allows you to increase the maximum upload size. The Increase Maximum Upload File Size plugin 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 taken place. Now upload the large file to your WordPress site.
We hope this article helped you to increase your WordPress upload size. Also, take a look at the following FAQs to learn more.
The default limit for the maximum file upload is typically set to 2 MB or 8 MB. This is to prevent larger files from being uploaded, consuming your web server’s disk space.
There is no specific recommendation on what value you should set. It will depend on your requirements and available resources. As a general rule, only increase it if you absolutely need it. Do not just set a huge value without actually needing it.
Usually No. It doesn’t have any effect on the security of your WordPress website. However, it will have an impact on the disk usage. Especially if you are allowing your users to upload media to your website, make sure to keep the maximum upload size at a reasonable number. It will also consume your bandwidth.