2
votes

I m not able to upload files to wordpress beyond 1Mb as the uploader is limiting me.

I have checked the phpinfo() and it showing 1000M but still the wordpress uploader is showing 1Mb as the max upload size.

Strangely i could not update the max_execution time to 1000 even though i have changed the some in php.ini

Is there some way the hosting providers are blocking some changes to php.ini file.

The info as shown here:

http://nvoids.com/test.php

http://nvoids.com/blog/wp-admin/test.php

thanks

4
I still see 10MB in the phpinfo() you linked for the wp folder. Check the wp-config.php file and an eventually present .htaccess if you are overriding the default setting.napolux
i see..but the uploader is anyways allowing 1MB stillPradyut Bhattacharya
That could be a time limit in your execution...napolux
i have updated exec to 600 but still no changePradyut Bhattacharya

4 Answers

1
votes

I guess you use multi-site wordpress. In this case, you can set "Max upload file size" in
Network Admin -> Settings -> Network Settings.
The php setting is rewritten by the wordpress multi-site manangement function. I met the same problem, hope this helps you.

0
votes

WordPress uses two php.ini values to determine the max upload size: upload_max_filesize and post_max_size. See https://github.com/WordPress/WordPress/blob/master/wp-includes/media.php#L1141-L1146. Here's the method from WordPress's source that determines the max upload size:

function wp_max_upload_size() {
    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
    $bytes   = apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
    return $bytes;
}
0
votes

Please add this code in your function.php file

add_filter('upload_size_limit','ashutosh_increase_upload');
    function ashutosh_increase_upload($bytes){
    return 2650000000; 
}
0
votes

You can change the settings the easier way if your host is GoDaddy cPanel:

  • Login to the cPanel Hosting Manager Account
  • Search for 'Select PHP Version' option and click into it.
  • In the top right corner click the button 'Switch to PHP Options'
  • Here modify or change any other settings which you need.

For example:

max_file_size

I have added the screenshots here:

Step 2Step 3Step 4