+92-322-4028612 sales@najeebmedia.com

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:

  1. upload_max_filesize – The maximum size of an uploaded file.
  2. 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.
  3. 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.