i am trying to upload theme in WordPress on the host located in digital ocean i getting this error The uploaded file exceeds the upload_max_filesize directive in php.ini.
i am increasing all the values in php.ini max_filesize and so on
and make restart to apeache2 in linux server
but i get the same error and i can't upload the theme how can i fix it ?
CodePudding user response:
Method 1 :
Add these values in .htaccess
file to increase the file upload size
php_value upload_max_filesize 512M
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300
Method 2 : By Editing wp-config.php
file
@ini_set( 'upload_max_size' , '512M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );
You can try any of these methods to increase the file upload size
CodePudding user response:
Yes, this is a limitation set on your hosting server.
You need to change upload_max_filesize
but also post_max_size
in php.ini
After that restart the Apache.
If you have PHP-FPM installed you will need to restart that as well.
Also if you have PHP-FPM installed make sure you are modifying the correct php.ini as there could be multiple php.ini per PHP version.