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 😉
Worked a treat… After trying several solutions this worked 'out of the box'. Thanks
Great, glad to hear it 😉
Hi Jay,
I've tried each of the various methods you describe above to try and get the htaccess file to work, but I'm having the same trouble that Tom S describes above. I finally downloaded your sample.htaccess file and uploaded, then renamed it–but I get the same error. Hmmm. On another, separate thread elsewhere I see a similar kind of workaround being employed on the php.ini file: I tried all of those as well–I don't get the errors, but it doesn't change the 8MB maximum upload limit. This is very frustrating, as I have a client who needs to upload a large audio file and we can't do it.
Tricky one. Let me see if I get this right: without any .htaccess file, all is well but your upload limit is 2MB (or the default PHP Upload Limit) correct? And when you amend the .htaccess file as I suggested or upload my sample file, all you get is a 500 internal server error, right?
Then the only explanation that makes sense is that the FTP client is screwing it up. Or, your server does not run Apache as a web server.
There's one other way you can add the file and the settings if you have SSH access to your server. Are you running your own server?
I can always do this for you if you get stuck: https://wpguru.co.uk/support/server-maintenance/ch…
Hey,
Thanks for the info. worked a treat on my WordPress site.
Andy