Simple Solution for WordPress Error: “Your php.ini upload_max_filesize is 2m”

By Michael in WordPress with 10 Comments

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.

Transform Your Knowledge and Skills Into Passive Revenue

Subscribe to Bigger Life Marketing Tips and receive Information Marketing Secrets, my free audio download that will help you transform your knowledge, skills and experience into passive income products that pay you over and over again. Just enter your name and email address below, and I'll get it right out to you. Click arrow for a sample.

Comments (10)

Trackback URL | Comments RSS Feed

  1. JamesD says:

    Thanks for the useful info. It’s so interesting

  2. Dan says:

    Thanks Michael, I ended up with the php.ini file in wp-admin, worked a treat.

  3. Bob Bean says:

    Thank you thats amazing!

    I have been searching for a solution to this for days and you made it so simple.

    THANK YOU!!

  4. Bradley says:

    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.

  5. I also ended up with the php.ini in the wp-admin directory and worked fine. Thanks a lot this was very helpful.

  6. Alan says:

    Right on works like a charm! Quick & Z-Z

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.