Changing the maximum Upload-Filesize in WordPress

A friend of mine (and myself) wanted to upload some files – mainly images… and the maximum filesize was 2MB. Thats a bummer…

So i went to to change the upload-size.

Foreshadowing: Nothing worked.

The trick was to edit the global php.ini, not to create a local one. At least the tutorial got me to get the right idea – thanks!

The global php.ini is (for me at least) in /etc/php/7.3/apache2/php.ini.

It is logical to change (at least) the version-number if you are reading this in the future.

Another hint for finding the location of your php.ini is typing php --ini in your terminal.

In your ini you can search for “upload” and get to the right section called “File Uploads”.

There you change “n” to your desired value: upload_max_filesize = nM ; n ε ℕ

In my case i changed it to 64M and got… 8M as maximum. I guess in my theme there is some other max-value in place that is at 8MB. As 8 MB is plenty at the moment, i dont care, and i will tackle the problem when either i need to be able to upload bigger files or my friend complains again…