I added the following to my .htaccess
file, but still can’t upload the file.
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_execution_time 600
php_value max_input_time 600
I added the following to my .htaccess
file, but still can’t upload the file.
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_execution_time 600
php_value max_input_time 600
8
Answers
Try adding
set_time_limit
to wp-config.phpAdd the following code to your
config.php
file.With a code or text editor, add the following code to your existing or new
php.ini
file:I think this is correct answer for your question
Refer to following URL:
Create or Modify the
.user.ini
FileIncrease the Max Upload File Size in Nginx
On an Nginx server, you can find the php.ini file at
/etc/php/7.4/fpm/php.ini
. Depending on which PHP version you’ve installed, the exact path may vary slightly.Use the WordPress
‘upload_size_limit’
FilterBelow is an example of this filter in action from WordPress contributor Drew Jaynes. It defines the upload size limit for all non-admin roles.
Add the following code to your
config.php
file.