Max Image File Size Upload on WordPress

I hit an issue uploading my photos to this WordPress instance. None of my photos would upload due to having a file size maximum of 2MB.

I googled around and found a plugin called Increase Maximum Upload File Size available here It showed I was limited to “Maximum upload file size, set by your hosting provider 2MB”. As I’m my own hosting provider, this must mean something OS level.

Assuming it was PHP that might be the limiting factor I looked for the settings that affect the two ways files are uploaded. These are:

  • post_max_size
  • upload_max_filesize

Running PHP 7.1, the config file is at /etc/php/7.1/fpm/php.ini. There was an existing entry for upload_max_filesize which set it to 2MB.

Changing this to 128MB and restarting php7.1-fpm.service allowed large file uploads. This was comfirmed in the plugin: