WordPress Tweaks & Tuts?

Subscribe to TheCreatology via RSS | Email

How to increase upload media file size limit in WordPress

by Aky Joe

Are you unable to upload media file in wordpress ? Well, you don’t have to worry about this common limitation set by wordpress. Usually, upload file size error occur when we try to upload a heavy file like a video, or a PDF file, or any other media, exceeding the upload file limit. WordPress throws an exception saying “This file exceeds the maximum upload size for this site”, a similar can be seen in screenshot below.

Error increase upload media file size limit in WordPress

Error Media file size exceeds limit

For different web hosting like hostgator or bluehost , WordPress sets different upload file size limit depending upon the PHP configuration on server. For instance, hostgator sets the default limit to 64MB. But there are many more web hosting, which set default limit to only 2MB. In this article we will learn to increase upload media file size limit in wordpress.

How to increase file upload limit in wordpress?

  • Login to CPanel of your website hosting, for instance hostgator or bluehost etc…
  • Navigate to /public_html/wp-admin using the file manager.
  • In the wp-admin directory look for php.ini file and if found then right-click to edit php.ini file in text editor. But if not found, then create a new file and name it as “php.ini” and then open it in the code editor.
Edit increase upload media file size limit in WordPress

Edit Php.ini File

  • When you click the edit button, as in the screenshot above, it will open the php.ini file in text editor. If you have just created new a file php.ini file, then simply copy-paste the below code and save it.
upload_max_filesize = 32M
post_max_size = 32M

  • But if you have edited the already existing php.ini file then, search for “upload_max_filesize” line and change the numeric value to 32M, or as desired, 64M, 128M etc…
  • Click save button and close the file.
  • Now login to WordPress Admin panel and navigate to Media > Add new media.
  • Now you will notice the maximum upload file size has been increased to the value we just set in the php.ini file, just like in the screenshot below.
Increase upload media file size limit in WordPress

Upload Media Size Increased

  • Now you can upload your media with file size up to 32MB, but if you want to increase the limit then you again edit php.ini file and change its desired value.

I hope this tutorial was not that complex as it seemed initially, but all’s well, that ends well. If you have any query or any further assistance required, then you can post comments as your feedback.

Similar Topics: ,

TheCreatology Support

Got a Query? We're ready, Just Say it!

If you have a doubt or a feedback, then get-in-touch with TheCreatology Support Team now.

Start a Hangout or Email Us

Are you looking for...

  • Logo Design
  • Web Development
  • Thesis Skin Design
  • Graphic Designing
  • Virtual Assistance
Hire Us!


{ read them below or add one }

Sarah April 7, 2011 at 8:08 am

Awesome, thank you. Worked great! Appreciated the clear instructions.


Asad Khan May 1, 2013 at 2:01 pm

Hi Joe, Awesome! Thanks a lot ….thanks thanks.


Tidy Design May 9, 2011 at 2:37 pm

AWESOME!!!! Many thanks, just what I was looking for 😀


Aky May 10, 2011 at 11:37 am

I am glad, that it worked for you. 😉


Ed Seward June 28, 2011 at 9:22 am

Thank you. After reading several solutions you gave one that actually worked.



Aky July 1, 2011 at 2:00 am

Your comment post is appreciated. 🙂


Newer June 29, 2011 at 5:20 pm

I have added a php.ini file and code is
memory_limit = 200M
upload_max_filesize = 200M
post_max_size = 200M
file_uploads = On
but this code does not work.
plz help me


Aky July 1, 2011 at 2:04 am

Well, I have reviewed the post again and the code is working fine. I am sure, you must have skipped some step.
Rest, if problem still persists, then you can get my assistance via contact form below, and I will be happy to help you. 😉


Newer July 1, 2011 at 2:45 pm

In my wordpress site, their is no any php.ini file and if i created new php.ini file and added above code but it it didn’t increase uploading size.Even I added new uploading size in wp-config file.Not working
So please tell me all procedure for increasing uploading file size


Jen July 31, 2011 at 3:18 am

I’m having the same problem as above my theme doesn’t have a php.ini file and can’t increase my file size


Aky August 5, 2011 at 1:06 am

@Jen: php.in file doesn’t exist in Theme directory, instead go to directory where WordPress is installed and look for WP-Admin directory and find php.in file.


Aky August 5, 2011 at 1:05 am

Well, there must some hosting issue, why don’t you create ticket for hosting people, I am sure they will look after it. 😉


Den August 4, 2011 at 5:46 pm

I have the same problem as Newer and Jen.


Aky August 5, 2011 at 1:08 am

I have discussed their cases above, I guess you might get solution from one of the above. 😉


Seth M. Baker August 14, 2011 at 12:52 am

Thanks for posting this. Your info is dead-on accurate, but due to the way I’ve installed my several domains, I had a little trouble with this. The domain I wanted to modify lives in a subdirectory below my primary domain.

I first tried to increase the max-upload on the php.ini in the top-level domain, but that didn’t work, so (as you said) I simply had to create a new php.ini file in the wp-admin folder of the site I was working on.



Mary K Gill August 31, 2011 at 11:09 am

Easy to follow instructions but I tried editing my php.ini file and kept getting ‘fatal error/timeout’ message. Tried creating another php.ini file (wouldn’t let me of course) so I created one php.ini1 – still no luck.
Any suggestions? Don’t want to have to write to my host company, if I can help it as they are slow in replying.


Mary K Gill August 31, 2011 at 12:43 pm

Update on previous comment: Have got the coding to work in my php.ini file in cpanel but not showing any increase in wp despite logging out/reloading the page. Any suggestions on this.


Nishit Manvar October 8, 2011 at 3:44 pm

Thank you Very Very much… it Works for me..!!


Jeff Cabel November 21, 2011 at 2:29 pm

I use godaddy.com as my host. Located the wp-admin in the ctrl panel and the php.ini did not exist. added the file and included the recommended perameters and still received the 8MB limitation error message when returning to WP and uploading larger file.

Any suggestions or experience with godaddy?

Thank you


vapour January 5, 2012 at 8:04 am

this post really realy helped me…thank you alot…is there anyway I can donate? to keep you going?


Patrick March 2, 2012 at 1:45 am

Hey I did this, and am still having the same issue – cannot upload a 13meg file .– however when I run my phpinfo test file it says:

upload_max_filesize = 32M
post_max_size = 32M

could it be a caching issue that the uploader hasn’t changed?


Ed January 18, 2013 at 5:44 pm

Hi Patrick,

Did you ever get this sorted? I’m having the same issue.

Both are set at 32M. I’m still only getting 11mb in the WordPress media uploader.

Any help would be greatly appreciated.




salem April 5, 2012 at 1:54 am

Thanks it’s work very perfect


Chris May 1, 2012 at 8:23 pm

I actually found this article on how to make it work using MediaTemple hosting.


Inserted your snippet and Voila! Works perfectly! Thanks!


Aky Joe May 2, 2012 at 2:17 pm

Good to hear about the issue getting resolved for you and the song Resonate. Cheers! 😉


Jason May 26, 2012 at 2:04 am

It does not seem to work with the latest version of WP!


Sanjay Humania June 4, 2012 at 11:56 am

Its working………
I have used it in my wordpress


Sherry May 28, 2012 at 12:32 am


I have hostgator as a hosting service. I followed all of your steps. First I went into /public_html/wp-admin. I did not have a php.ini file so I created one and added the content you suggested. I then went back to wordpress and clicked on media and my file size had not changed at all. Do I follow different steps if I have multiple sites being hosted at hostgator, or is this step suppose to fix all of the WP sites on hostgator? Please help.


Aky Joe May 28, 2012 at 12:28 pm

I am using Hostgator hosting and my max. upload limit is 64M. You should contact Hostgator Support via chat or call and ask them to diagnose this problem for you.

P.S. => As this tutorial is WordPress specific, hence you will have to follow this procedure for all your WordPress websites hosted at hostgator.


Bren Murrell June 27, 2012 at 4:57 am

Hay just wanted to stop and say thanks! This code was just what I was looking for!


Casey Helmick July 16, 2012 at 7:57 pm

Thanks a lot! Been trying to figure out how to do this and your post lead me in the right direction.


Website Design December 3, 2012 at 10:45 pm

Thank you. I was stuck on this for a while. Most blogs had the same recommendation but did not specify it was the php.ini file within the wp-admin folder. You saved me from going crazy lol


Geri horsley February 9, 2013 at 7:22 am

If some one wishes expert view about blogging and site-building then i
advise him/her to pay a visit this website, Keep up the pleasant work.


sam April 1, 2013 at 9:25 pm

I want to say THANK YOU for your explanation in everyday English, It helped me to solve my problem )


tazo April 26, 2013 at 8:19 pm

This may help, if you add this into your .htacess

php_value post_max_size 40M
php_value upload_max_filesize 40M
php_value memory_limit 500M


Mike August 22, 2013 at 2:14 pm

I tried this & my wordpress instance had a server error500.


Aky Joe September 1, 2013 at 2:18 pm

Internal server Error 500 depicts that there is some erroneous snippet in htaccess file. Make sure you copied the right code in your htaccess file.


popmusicmix.com July 19, 2013 at 7:13 am

I also added tazo’s codes in the .htacess and that worked for me. I changed the size up to 128M and it’s all okay.


BULLBOYKENNELS July 25, 2013 at 12:55 am

I just wanted to add, that with Bluehost even though the php.ini is set to be used by all subfolders, it is not used by Wordpress for some reason. So if you make changes to the php.ini file and it is in your root folder, then just copy it to /public_html/wp-admin and it should now show up correctly for you.

Nice post by the way.


Mike August 22, 2013 at 2:05 pm

Hey -simple & easy to follow. Thanks buddy.

Most of the other stuff I googled, had either out of date or overly complex instructions that had little relevance to my problem.

Keep up the great work.


jamie September 19, 2013 at 3:42 am


Ive read your post about changing the upload limit for wordpress. I created a php.ino and added the coding as instructed. When i get to the uplaod screen the limit is at 270MB as set ( my file is 268.14MB). However the uplaod bar reaches 100% but does not crunch or upload etc. It just stays with 100% uploaded bar but does nothing else. could you give me and ideas on how to fix this?

Thank you


Kim September 22, 2013 at 4:37 am

Thanks so much! Worked great!


Francisco October 8, 2013 at 5:59 am

Thanks for the easy steps, I found other pages but they were not as easy and well explained as yours, keep up the good work!!


patrick December 28, 2013 at 12:00 am

the best option to use is php.ini but many coder or developer just don`t know how to teach other people very simple way of doing it, this is my second time of doing it and I can tell you where you are making the mistake.
Log into your root server where wordpress is installed and navigate to wp-admin folder and make sure to delete any php.ini file in that folder if any, then open your NOTE-PAD and paste the code below

memory_limit = 200M
upload_max_filesize = 200M
post_max_size = 200M
file_uploads = On

now save it as php.ini and upload it to your wp-admin folder, now you can check your wordpress to see the size limit

important note: php.ini must be in small letters like abcd and not ABCD that is you must save it with php.ini and not PHP.ini that is where most people where having problem, and if you which to change your size again, delete the file and create another one with the same process.


Sonja March 20, 2014 at 11:47 pm

YES This was the answer: put the php.ini file in the public, not the wp-admin if using Blue Host (I have it in both spots just in case actually) Works great.


Michael B July 27, 2015 at 8:24 am

Dear, Dear, Sonja,
Thank you, you wonderful lady. I was up all night redoing videos, trying plug ins, etc. Thought I would really mess things up trying the code thing but couldn’t find the files where everyone kept telling me to look. After reading your post, 10 minutes later I was uploading my 50m file. I love you! Thank you so much.


Nowsath October 8, 2014 at 2:54 pm

Thank you very much!!!! Works like Charm. Saves my time!!!


Leave a Comment

Previous post:

Next post:

Contact Aky

Yes, I agree that all information above is valid.

Simple question, what's...