WordPress’s Media Uploader makes it really easy to upload images, videos, documents, themes, plugins and more to WordPress Website. It is a great tool for users who don’t want to use FTP uploaded.
Sometimes, a file is uploaded to WordPress site, you will see the message “Are you sure want to do this?” or “The uploaded file exceed the upload_max_filesize directive in php.ini”. It means that you have an upload max file size limit.
By default, WordPress limits the size of the media file. To see what your media upload limits are, go to Media > Add New in WordPress admin.So, one question if is mentioned as “If you want to upload one file having the larger size than 1.000 MB, how will you do?”
Increasing WordPress Upload Size is a good solution to work. First, make sure that you do not have a free account through WordPress.com and you got access to your site’s files via your host’s file manager, for example, FTP account. In this article, we will show you 3 ways to increase maximum file upload size in WordPress.
1>Theme Functions File
You absolutely add this custom code into functions.php file in your source to increase the file upload size and max execution.
@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
In general, if you are on a shared host, you will not see a php.ini file in your root directory. If you don’t see that, you can create a file called php.ini and upload it to the root folder.
And add this custom codes to increase file upload size:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
The number of elements can be changed to fit with your source.
3> htaccess Method
The .htaccess file is an important file on your server for directing visitors. One error in this file leads to your down website. And you need to care to use this solution for increasing your file upload size.
You can open or create the .htaccess file in the root folder and add the following 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
Conclusion, we strongly emphasize that if you are on a shared hosting package or depend on your host, these methods might not work for you. The best solution is that you should contact your provider hosting to increase the limit.