Local Community

Configure upload_max_filesize in Ubuntu 20.04 / Local 5.7.4

Issue Summary

Changing the upload_max_filesize value on Ubuntu has no impact on http://testphp73.local/local-phpinfo.php - and no impact to max upload size inside Wordpress. Stuck on 300MB

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    New Site and existing. New site, to reproduce, is Nginx / PHP 7.3.5 / mySQL 8.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes, but can not change the upload_max_filesize value

Replication

On Ubuntu:

  1. Create Site - Custom configuration
  2. Edit /conf/php/php.ini.hbs (inside the root dir)
  3. Restart Site

This does, indeed, copy the php.ini.hbs to /home/steven/.config/Local/run/GEg0LcOuV/conf/php/php.ini

  1. refresh http://php73.local/local-phpinfo.php

upload_max_filesize remains as 300Mb

In the event I delete EVERYTHING from /conf/php/php.ini.hbs - make the file null - and restart the MAMP instance - the file in step 3 is overriden. in the local-phpinfo.php, the “Loaded Configuration File” is listed as /home/steven/.config/Local/run/GEg0LcOuV/conf/php/php.ini - however, this is a NULL file.

So, it seems that Apache has the same issue, when changing from Nginx - so there’s no difference.

In Visual Studio Code, doing a global search for “300M”, I have no 300M (as in, the upload_max_filesize file limit) is found, so I’ve changed this value.

System Details

  • Which version of Local is being used?

    • Local 5.7.4
  • What Operating System (OS) and OS version is being used?

    • Ubuntu 20.04
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:
    local-lightning.log (13.5 KB)

Good news.

Restarting my entire system resolves this issue. Far from ideal. Restart of specific site, restart of Local runtime doesn’t work. Full system restart does the job.

Not ideal, but a workaround.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.