Are you facing a Maximum File Upload limit issue in WordPress?
Depending on your web hosting provider and the package you opt for, you’ll see a maximum file upload limit in your Media Upload tab in WordPress. For some, it can get as low as 2 Megabytes which is certainly not a lot as far as media files including audio & video are concerned. Pictures can be less than 2 MB, so it works fine for the pictures most of the time. In this article, let’s discuss on how you can increase the maximum file upload limit in WordPress.
Note: This is not a beginner-level tutorial. It may or may not work with all the web hosts in which case you may need to ask your web hosting provider for their support. We use & highly recommend HostGator, and they are very prompt with resolving issues if they arise at any point of time.
1: Theme Functions File
There are special cases where you can increase the upload size by just adding this code in the theme functions.php file, which lives in the theme’s root folder:
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '48M'); @ini_set( 'max_execution_time', '250' );
2. Create or Edit an existing PHP.INI file
In most cases, if you use a shared host, you won’t find a php.ini file in your directory. If you do not see one, then you’ll have to manually create a blank file called php.ini and upload it in the root folder. In that file add this code:
upload_max_filesize = 64M post_max_size = 32M max_execution_time = 250
This method works for most of the users. Remember if 64 doesn’t work, try lowering it down to 10 or something in that range.
3. htaccess Method
Some people have tried using the htaccess method in which you’ll have to modify a hidden DOT file named .htaccess, which lives in the root directory. Open or create .htaccess in the root folder and add this code snippet in it:
php_value upload_max_filesize 64M php_value post_max_size 32M php_value max_execution_time 250 php_value max_input_time 250
Again, it is important to note that if you are on a shared web hosting, then these techniques may or may not work. In this case, you would have to contact your web host as a last resort. Not all hosts are prompt in resolving issues. We recommend you use HostGator. These guys are very helpful.