Installation Errors for Local

the uploaded file exceeds the upload_max_filesize directive in php.ini.

Finding php configuration file

php -i | grep "Loaded Configuration File"


There are two php.ini files in the system. one found here /etc/php/7.4/cli/php.ini is system install php version file.

second is here /etc/php/7.4/apache2/php.ini. change one then check then change the other too see if it works out.

then restart sudo systemctl restart apache2

Method 2. Editing the wp-config.php File

Add the following line before the “That’s all, stop editing! Happy publishing” line:

@ini_set('upload_max_size' , '512M' );

.htacess Role

i edited .htacess file too for increasing the limit but it did the oposite. we can control the limit of particular site with no matter how much limit is set on system php.ini or webserver php.ini file.

Add the following line at the bottom of the file: php_value upload_max_filesize 256M php_value post_max_size 256M php_value memory_limit 512M php_value max_input_time 180 php_value max_execution_time 180