How to: Increase WordPress Upload limit

WordPress is a great content management system. But sometimes it’ll give you a headache. Some of us might see this error “The uploaded file exceeds the upload_max_filesize directive in php.ini”  or something like that, when we trying to upload files into the WordPress site. Actually it’s not WordPress’s problem. This is because of your server has limited  maximum uploading size. Most servers  set 8MB as it’s default maximum file upload size.

So, how can I fix this issue?  You can solve this issue in 4 methods.

php.ini method

Open your “wp-admin” folder in your WordPress installation  and create a file with name “php.ini“. Open this file  for edit  and copy/paste the following lines and save “php.ini” file.

memory_limit = 100M
upload_max_filesize = 150M
post_max_size = 100M
file_uploads = On

The above lines will increase the uploading limit up to “150MB” also it’s increase the memory limit up to “100MB”.  This will work on most servers however some have an issue with this. If your server not supporting this method checkout the next one.

functions.php method

Open the functions.php file, that located in your current WordPress theme  folder, for edit. and copy/paste following lines of code at the top of the file  then save the file.

@ini_set ('upload_max_siz' '64M ');
@ini_set ('post_max_size', '64M ');
@ini_set ('max_execution_time', '300 ');

.htaccess method

Open .htaccess file, located in your root folder of the WordPress installation and  copy /paste the following code then save the file.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

wp-config.php method

define ('WP_MEMORY_LIMIT', '64M ');

Open .wp-config.php file, located in your root folder of the WordPress installation and  copy /paste the following code then save the file.

If these methods didn’t work please ask your host provider to increase the uploading size.