Increasing Maximum Upload Limit

By October 12, 2015 Uncategorized
Increasing Maximum Upload Limit

Increasing Maximum Upload Limit

I have seen people running berserk on the error thrown by the WordPress Media Uploader. Have you encountered an error stating the max size limit exceeded?

Most of the people have encountered this error. There is no need to panic. This error is due to the modest limit set by default WordPress Setting. If you have a huge site which need media contents bigger then the default limit then it will be a problem for you. A n awful message saying

The uploaded file exceeds the upload_max_filesize directive in php.ini

This may trigger a panic in you. But it is not that big of a problem to worry. It is just a simple line of codes that is restricting the upload from a certain limit.

How to fix the error “The uploaded file exceeds the upload_max_filesize directive in php.ini”

The fix of this error  iis just Increasing Maximum Upload Limit. Thought most of the time it depends on Hosting environment. In most of the cases this solution will work.

Go to your Website file manager inside your Hosting Panel. There is a small button like link which says “Show Hidden Files”. Click on it. Them navigate to the wp-admin folder. Search for the file named php.ini or php5.ini.

There is chances that you will find that file but if you don’t then create a file php.ini. 

Inside the file paste the below code:

upload_max_filesize = 2000M
post_max_size = 5000M
memory_limit = 5000M
file_uploads = On
max_execution_time = 300

All the above stated Sizes are in M which means Megabytes. You can set you desired limit as per your need. Click on save and check and upload the file again. This should solve the issue. If it does not solve the issue continue reading.

Increasing Maximum Upload Limit using .htaccess file

You can also use .htaccess file for Increasing Maximum Upload Limit.Now go to root directory of you website. You will find a file named .htaccess. Add the below code to your .htaccess file.

php_value upload_max_filesize 2000M
php_value post_max_size 5000M
php_value memory_limit 5000M
php_value max_execution_time 300
php_value max_input_time 300

Click on save and try checking the media uploader again. This should definitely solve the problem.

There is a thin chance that your server is tightly managed and the hosting does not allow to change values in php.ini files. But this can definitely happen. So you need to ask your host to increase the limit to your desired. You can open a ticket with your hosting Provider and ask them to increase the limit. It may take couple of minutes for them to change it.

Increasing Maximum Upload Limit is very easy as stated above. This is restricted by php.ini file so editing this file is all you need to do.


Leave a Reply

Enter the Captcha * Time limit is exhausted. Please reload CAPTCHA.