Change the Maximum Upload File Size

Change the maximum upload file size

You need to set the value of upload_max_filesize and post_max_size in your php.ini :

; Maximum allowed size for uploaded files.
upload_max_filesize = 40M

; Must be greater than or equal to upload_max_filesize
post_max_size = 40M

After modifying php.ini file(s), you need to restart your HTTP server to use the new configuration.

If you can't change your php.ini, you're out of luck. You cannot change these values at run-time; uploads of file larger than the value specified in php.ini will have failed by the time execution reaches your call to ini_set.

See the Description of core php.ini directives.

wordpress max upload size doesn't change

Alright, here are a few solutions I can think of for a localhost user. With localhost, I assume you have full control so try the below options if any works let me know.

.htaccess
Edit the .htaccess file in your WordPress site’s root folder and add the following code:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Theme functions
add the following code to the theme’s functions.php file, you can increase the upload size:

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

let me know if any of this works.

PHP Change Max File Size Upload

using .htaccess file in the root directory, you can increase the maximum upload size

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

other way change
php.ini file

upload_max_filesize = 128M
post_max_size =64M
max_execution_time = 300
max_input_time = 300

Cannot increase maximum upload file size in local WordPress

I shouldn't create any php.ini file in /var/www/html/. I found /etc/php/7.0/apache2/php.ini path in phpinfo() details. So i found and changed these configs in this file : upload_max_filesize, memory_limit, post_max_size and max_execution_time.

NOTE: I was right! HTTP error. while uploading media was because of
bad fix for this problem. now i can upload any media correctly :)



Related Topics



Leave a reply



Submit