How increase file upload size limit in wordpress
Your php installation putting limits on upload file size. The default will restrict you to few MBs upload file size. You need to set the following three configuration options:
- upload_max_filesize – The maximum size of an uploaded file.
- memory_limit – This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server.
- post_max_size – Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.
Edit .htaccess file to increase file size limit in wordpress
Many host will let you change settings in .htaccess files. WordPress comes with an .htaccess file that should be uploaded to your server in the root of the WordPress installation. You may edit this file to set additional settings. Add following code at the end of your .htaccess file:
php_value post_max_size 40M
php_value upload_max_filesize 25M
php_value memory_limit 500M
If [green]<IfModule mod_php5.c>[/green] already exists in .htaccess file you should add the above settings within this tag, do not create another [green]<IfModule mod_php5.c[/green]> section.
Najeeb,
Just found this post. I tried adding your code into the htaccess file. You’re missing the php_value (before) memory_limit.
Without this I get an Internal Server Error. I added the code the php_value and it doesn’t break the site.
Oops! thanks for this.
NICE! At leas I found this!
Nice new 2012 solution for upload increasing!!!
Hello sir I’m trying to find that .htaccess file and I can’t find it could u tell me when I make the file what should I save it as?
https://najeebmedia.com/how-increase-file-upload-size-limit-in-wordpress/
Please see above url.