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 πŸ˜‰





Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.