How can I increase the file upload size limit. When I upload file via media section, I got error like exceeds the maximum upload size for this site
Depending on the web hosting company you bought and the package you have purchase, each of you will see different maximum file upload limit on your Media section in WordPress. For some it is as low as 2MB which is clearly not enough. So we need to increase the maximum file upload size in WordPress.
There are some ways you can following to increase the maximum file upload size.
1. Via theme function file.
add following lines to functions.php of your active theme
@ini_set( 'upload_max_size' , '128M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'max_execution_time', '300' );
2. Via php.ini file
Creating a new php.ini or editing your existing php.ini file in your root folder. Then add following lines to php.ini
upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300
3. Via .htaccess file
Edit or create the .htaccess file in the root folder and add the following lines
php_value upload_max_filesize 128M php_value post_max_size 128M php_value max_execution_time 300 php_value max_input_time 300