Tapan's World

Tapan Kumer Das

Darus Sallam, Mirpur, Dhaka, Bangladesh
Tapan Kumer Das

How to : Increase Maximum File Upload size for WordPress

September 15, 2015, by tapan, category How To, Wordpress


Hows going on? Hope you are doing well. Today I am writing over the issue of Maximum File Upload size for WordPress. Basically I waste my one hour time for fixing this issue. I tried to import Revolution Slider with their import facility, but after click over import I found a message said
importing slider settings and data…
Error: Import file not found!!!
Go Back.

I searched a lot but can’t fix the issue. All of a sudden it came into my mind that it could be PHP file upload size issue. I checked my Maximum upload file size from Media upload and found that its only 2MB (which is default) and I am using a shared hosting. Normally in VPS/Dedicated server you have the permission to edit php.ini file and you can custom this settings by edit that file. But as I am using shared hosting, I don’t have permission to edit the “php.ini”.

There is 3 other way to change php.ini settings. Those are as follows,

1. Edit wp-config.php file

Sometimes you could fix the issue by just adding the following lines in your wp-config.php files,
ini_set( 'upload_max_size' , '64M' );
ini_set( 'post_max_size', '64M');

2. Create or edit an existing php.ini in server root

Also you could create a php.ini file in your hosting root directory (public_html) and add the following lines for fix the issue,
upload_max_filesize = 64M
post_max_size = 64M

3. Edit .htaccess file

Also you can edit your .htaccess file and add the following file can fix the issue,
php_value upload_max_filesize 64M
php_value post_max_size 64M

But remember, it all depend on your shared hosting settings by the hosting provider. Some of this fix may not work like the .htaccess fix gives me a 500 internal error. Try this technique step by step and check whether its working or not. If none of this working for you then it seems your hosting provider stop this fix for your package. In that case contact with your hosting provider and ask them to increase the file upload size for you.

Cheers! 🙂

So, what do you think ?