How to increase media file upload size limit

Follow this guide to update the PHP conf file, e.g. by adding these two lines to the end of /etc/php/8.0/fpm/pool.d/username.conf

php_value[upload_max_filesize] = 256M
php_value[post_max_size] = 256M

https://spinupwp.com/doc/how-to-change-php-settings/#per-site-settings

The file path will be different, depending on the server you're making the changes to.

After updating the configuration make sure to reload the service. The version number in the command might be different for your case.

sudo service php8.0-fpm reload

Also make sure the client_max_body_size config value for NGINX matches or is higher than the above PHP config values.

Here's a guide on how to update it: https://www.cyberciti.biz/faq/fix-client-intended-to-send-too-large-body-xyz-bytes-in-nginx/

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.