Increase max file upload size on WordPress
Views: 527
Read Time:54 Second
Check the current max file upload size
Open Media -> Add New Media in the admin panel of wordpress. The max upload size is shown at the bottom.
Install WordPress Plugin to Check the Parameters
I found “Wp Maximum Upload File Size” plugin to work great to examine all the parameters that need to be set. It’s a great tool to validate if everything is set correctly including for the following steps.
Update php.ini if the limit is set by PHP
- Edit
/etc/php/8.1/fpm/php.ini
- Update the following
upload_max_filesize 256M post_max_size 256M max_execution_time 300 max_input_time 300
- Then reload php config
sudo /etc/init.d/php8.1-fpm restart
- You could check if the config is updated successfully using a php file with
<?php phpinfo(); ?>
Install php zipArchive
Check if zip is installed via php -m
. If it’s not installed, install it
Trending
sudo apt-get install -y php-zip
Lastly, restart caddy and php
sudo /etc/init.d/php8.1-fpm restart sudo systemctl reload caddy