How to increase the maximum WordPress file upload size
On your media uploader page every WordPress user will see a maximum limit of the file upload; it depends on your choice of webhosting company and also on the selected package. Sometimes it is too low, that is about 2MB, which is surely not enough for audio and video media files. Mostly, it is affordable for pictures. With the help of this article, you will be able to learn how to maximize the file upload size in WordPress.
One thing to notice here is that this tutorial is of an intermediate level. It may not be suitable for some shared hosts, which need to ask for support from their webhosting service provider. We recommend you to use Rackhansa; they proved to be more helpful, especially in case of such matters.
1. Theme Functions File
We came across many cases where just by adding the code (given below) in the file of theme function, the upload size can be successfully increased.
@ini_set ('upload_max_size', '64M'); @ini_set ('post_max_size', '64M'); @ini_set ('max_execution_time', '300');
2. Creating and editing of an already existing php.ini file
Mostly, while using shared hosting, your directory will not show you a
php.ini file. If it is not visually apparent to you, then create a file labeled as
php.ini and upload it in your root folder. Add the code given below in that file:
upload_max_size = 64M post_max_size = 64M max_execution_time = 300
This method is allowed to be used by many users. Keep in mind if sometimes 64MB doesn’t work, try for 10MB.
3. Htaccess Method
Some people have tried using the htaccess method by modifying the .htaccess file in the root directory so you can increase the maximum upload size in WordPress. Open or create the .htaccess file in the root folder and add the following code:
php_value upload_max_size 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
Note: You can also create a new .htaccess file if it’s not there by default.
Again, we want to make you realize that if you have a package of shared hosting these techniques might not be applicable. For maximizing the limit for you, you have to ask your webhosting provider this time. Sometimes, hosts don’t cooperate. So, we highly recommend you to use Rackhansa. You will find their cooperative folks useful in such conditions.