Error while uploading: The uploaded file exceeds the upload_max_filesize directive in php.ini. Can’t upload more than 2M deafult.
If you have a self-hosted WordPress site with LAMP & Apache2 and using a multi-site configuration and it will not obey file size increase changes in php.ini, .htaccess or wp-config.php, stop and read below before you defenestrate:
You need to locate and edit this one file, it sets a global default.
set post_max_size = 25M
upload_max_filesize = 25M
When you have finished, don’t forget to reload apache:
sudo systemctl reload apache2
Next, go to network admin –> settings and edit the desired size so long as it’s below the size set in php.ini