How to increase Maximum upload file size from 2MB

I’ve the default Ubuntu20.04 install of wordpress 5.6 – installed by following Digital Ocean’s guide but can’t work out how to increase the upload limit from the default of 2MB.

The plugin “Wp Maximum Upload File Size” tells me

Important: if you want to upload files larger than 2MB (which is the limit set by your hosting provider) you have to contact your hosting provider.
It’s NOT POSSIBLE to increase that hosting defined upload limit from a plugin.

So how do I change the limit? I’ve root on the host machine, I can start down the rabbit hole of grepping for the string “Maximum upload file size” which seems to be printed with $max_upload_size… but surely I’m missing something obvious.

Before I installed the plugin (I’m not running any other plugins and didn’t think I needed one for this) I’ve attempted to follow the instructions here to increase the size from 2MB so:

/var/www/ has this at the end

php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

/var/www/ has this at the start

@ini_set( ‘upload_max_filesize’ , ‘128M’ );
@ini_set( ‘post_max_size’, ‘128M’);
@ini_set( ‘memory_limit’, ‘256M’ );
@ini_set( ‘max_execution_time’, ‘300’ );
@ini_set( ‘max_input_time’, ‘300’ );

I’ve found more instructions
so now both:
/var/www/ and
to include

@ini_set( ‘upload_max_filesize’ , ‘101M’ );
@ini_set( ‘post_max_size’, ‘102M’);
@ini_set( ‘max_execution_time’, ‘300’ );

yet when I go to upload media I’m still presented with Maximum upload file size: 2 MB. I’ve force reloaded I’ve rebooted the server, I’ll not resorted to live animal sacrifice yet though…

Source link