That’s how you can increase maximum media upload size in wordPress

On the media uploader page in WordPress one would get the maximum file upload limit depending on the web hosting company and package they choose. It can be as low as 2MB, which is quite good enough to upload the images but when it comes to share the videos it becomes difficult because even low quality videos has size bigger than 2MB. Let’s discuss how one can increase the maximum media upload size in WordPress with some useful methods.

(A). Creating or Editing PHP.INI File
If you are using a shared hosting and don’t have php.ini file in your directory, you can simply create a file called php.ini and upload it in the root folder or if you already have php.ini file in your directory then you can enter the code below to increase the maximum file upload limit. The limitation of this method is that sometimes it doesn’t work so try using 10M in the code.
1 upload_max_filesize = 64M
2 post_max_size = 64M
3 max_execution_time = 300

htaccess-method

(B). htaccess method
This is the similar process as the above one where you have to edit the existing .htaccess file in the root folder and add the following code. In some cases if you are using shared hosting package, then this may not work. In that case you have to contact your web hosting provider to increase the maximum media file upload limit.
1 php_value upload_max_filesize 64M
2 php_value post_max_size 64M
3 php_value max_execution_time 300
4 php_value max_input_time 300

(C). Function File
In this case you have to add the following code simply in the theme function file to increase the file upload limit.
1 @ini_set( ‘upload_max_size’ , ’64M’ );
2 @ini_set( ‘post_max_size’, ’64M’);
3 @ini_set( ‘max_execution_time’, ‘300’ );