How to Increase Maximum File Upload Size in WordPress

Today In this tutorial I will discuss about some methods which will help you to Increase Maximum File Upload Size in WordPress.  The web hosting company that you chose to host your web site and also the package you select from it has a say over the maximum file upload limit in your Media uploader page in WordPress. Some of the deals allow you as low as 2 Mb only and this is evidently not enough for larger media files. You can upload pictures without a problem as most come under 2 Mb but you will have trouble uploading any audio or video file. So, here is some of the ways by which you could increase the maximum file upload size in WordPress.

Increase Maximum File Upload Size

Theme Functions file

This is the first method to the Increase Maximum File Upload Size.  Sometimes it is just easy to increase the upload size by adding the following code in the theme function’s file. Follow the steps below :

First Step : Login to your wordpress admin and on the left menu bar click on Appearance and then click on Editor.

Second Step : Now Click on the function.php file which will be listed in all the files on the right side and on the bottom the file paste the following code.

@ini_set(‘upload_max_size’, ‘64M’ );
@ini_set(‘post_max_size’, ‘64M’ );
@ini_set(‘max_execution_time’, ‘300’ );

Now click on save. This will definitely Increase Maximum File Upload Size

 Creating or Editing an existing php.ini file
This is the second method which will help you to Increase Maximum File Upload Size.   In this method you have to modify php.ini file which will be available in you web directory. In many number of cases, when you are using a shared host you will not see any php.ini file in your directory. If you don’t find one, you have to create a file called php.ini and upload it to the root folder. After Uploading the file, Add the following codes in that file,

Upload_max_filesize = 64M
Post_max_size = 64M
Max_execution_time = 300

Sometimes this way is stated working for many users. If the 64M doesn’t work, use 10M instead, sometimes that works.

The .htaccess method

In this third method you need to modify .htaccess file to Increase Maximum File Upload Size.   Some of the users have found success by using the .htaccess method in which users modify their .htaccess file in the root directory and this increases the maximum upload size in WordPress. Create a .htaccess file in the root folder and add the following codes:

php_valueupload_max_filesize 64M
php_valuepost_max_size64M
php_valuemax_education_time300
php_valuemax_input_time300

Alternate method to change the .htaccess file is install SEO by Yoast Plugin and then go to SEO> Tools > File editor and you will see .htaccess file and can easily make the neccessory changes.

Increase Maximum File Upload Size

I would like to stress here again that if you are into one of those shared hosting package this method won’t work. You have no other option but to contact your web hosting provider and ask to increase the limit for your site. While some hosts turn down this kind of queries from customers completely, some like HostGator will be helping in these situations.

I am sure this article will help you to Increase Maximum File Upload Size.  If you have any double then feel free to contact me using the comment form below.  And don’t forget to share this article with your friends and social circle.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

14 − 2 =