Simple Solution for WordPress Error: “Your php.ini upload_max_filesize is 2m”
Recently, a client emailed me and stated he was having trouble uploading an image with the WordPress Image Uploader. Each time he tried to upload the image, WordPress gave him this error message:
“Your php.ini upload_max_filesize is 2m”
After doing a bit of research I discovered what was causing the problem. Without getting too technical, the PHP settings of his web server were limiting the maximum file size that he could upload.
The fix is rather simple:
1. Open your favorite text editor, such as Notepad, and paste in this code:
[PHP]
; Increase maximum post size
post_max_size = 20M
; Increase maximum upload size
upload_max_filesize = 20M
1a. You may want to increase or decrease the “20M” above (20M = 20mb).
2. Save the file as php.ini.
3. Next, upload the php.ini file to to the WP-Admin directory in your WordPress installation. the directory in which your core WordPress files are stored.
4. After that’s done, you may need to dump the cache on your browser and restart your browser.
5. If you still have problems after all that, try uploading the file to the main directory of your WordPress installation. And if you still have problems after that, you should contact tech support for your web host. Tell them you are trying to increase your maximum file upload size, and ask where you should place your php.ini file.
Take Your First Step Toward Living a Bigger Life
Subscribe to Live a Bigger Life and get inspiring ideas and strategies that will help you use the web to make a difference in the world, make more money and live a bigger life. Just enter your name and email address below, and click submit.





Hi there. I'm Michael Pollock. I inspire and teach creative entrepreneurs how to use the Web to make a difference in the world, make more money and live a bigger life ... 




Thanks for the useful info. It’s so interesting
my pleasure jamesd.
Thanks Michael, I ended up with the php.ini file in wp-admin, worked a treat.
thanks for the comment dan. glad you figured it out. where the php.ini file goes seems to depend on your specific server set-up.
Thank you thats amazing!
I have been searching for a solution to this for days and you made it so simple.
THANK YOU!!
my pleasure bob.
Thanks. Funny how something so simple turns out to be an FTP upload and an edit (or creation) of a php.ini file. I suppose this isn’t a WP option, but a hosting limit? Anyway, thanks again for the simple explanation.
I also ended up with the php.ini in the wp-admin directory and worked fine. Thanks a lot this was very helpful.
Right on works like a charm! Quick & Z-Z
Glad it worked for you Alan.
I’m so happy; it worked for me too.
Thank you….
My pleasure Jessica. So happy it was helpful to you