htaccess increase upload size
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
htaccess increase upload size
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
PHP (WordPress) - Increase Maximum Upload File Size
// Increase Maximum Upload File Size
@ini_set( 'upload_max_filesize' , '128M' ); //set this to a value > than your backup
@ini_set( 'post_max_size', '128M'); //set this to a value > than your backup
@ini_set( 'memory_limit', '256M' ); //set this to a value > than your backup
@ini_set( 'max_execution_time', '300' ); //set this to 0 (infinite)
@ini_set( 'max_input_time', '300' );
htaccess increase upload size
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
how to increase maximum upload file size in wordpress stack
After spending hours, I went through almost all the posts but no luck. And finally resolved the issue with these steps. This might be weird solution but worked for me.
Find php.ini file in /etc folder or / folder by running below cmd:
grep -rl "post_max_size" | xargs ls -lrth
Here I have used the post_max_size keyword to search the "php.ini" file in /etc folder ,but in some systems you can find this on /var/www/html or /var/www/wordpress folders.
We have multiple posts on the internet as if the php.ini file is not present in the WordPress folder then you can create but in my case that doesn't work.
Edit the php.ini file and change the value like this.
post_max_size = 100M
upload_max_filesize = 100M
In the above you can set any value as per your requirement.
Restart the httpd or Nginx or apache and PHP service, or as per setup, you can restart the web service.
For me httpd and php-fpm service restart worked in centos 8:
service httpd restart
service php-fpm restart
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us