How to change the PHP Upload Limit

Usually your hosting package limits the amout of data you can upload to 2MB, which isn’t enough for most of us. It’s good for that 200k photo, but say you’re uploading a 4MB audio clip, a video or a large PDF, you’re stuck.

Fret not my friends, for help is at hand! Put the following code in your .htaccess file and smoke it:

php_value upload_max_filesize 100M
php_value post_max_size 100M

Instead of “100M” you can choose any limit you like, say 5M, 10M or whatever limit you like.

If you can’t find the .htaccess file, it might either be that

  • your FTP client doesn’t display hidden files; make sure that it does
  • or it doesn’t exist (in which case, create a plain text file, upload it and name it .htaccess)

If you’re having trouble, just download this file. Then simply unZIP it and upload the contents into your WordPress directory. Once it’s on the server, rename it to .htaccess and you’re done.

Good luck ๐Ÿ˜‰

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

23 thoughts on “How to change the PHP Upload Limit

  1. Thanks, Jay. I’m a bit confused as to why such a limit would be imposed. I’m using WordPress through a hosting service with unlimited (theoretically) memory. I basically just want the option of embedding MP3 and video files without having to link to something like Soundcloud (whose visual interface I don’t like.)

    Any other options for how to get around this 8 mb limit?


    1. I’m sure you hosting company can increase this for you – if not via .htaccess then maybe there’s another way. Having said that, shared hosting is a finely tuned ecosystem so I do understand that they want to keep the caps on how much RAM each user can use. Who are you hosting with? Unlimited is probably referring to disk space rather than system memory ๐Ÿ˜‰

      You can upload larger files via FTP and then link to them manually. It’s not as convenient as uploading them from the WordPress backend, but works with files as large as your web space allows. Search for FileZilla, that’s a free FTP client. Upload your files to wp-content/uploads for example and access them like this: http;//

      Hope this helps ๐Ÿ˜‰

      1. Thank you Jay! I’ve been searching the internet for a solution. Editing the .htaccess file did not work for me either (I got the internal error message). I don’t know why I did not think to just upload it via an FTP program, but this makes perfect sense!

Add your voice!