How to Edit a php.ini File in Flywheel’s Local App
You know those times WordPress is all, “Hey, we’re running out of memory here… think you can increase it?” Here, maybe a screenshot will help.
It’s an age-old problem with an age-old solution: update the upload_max_size
deal-eo to some bigger value, say 128mb
or whatever you need in some file called php.ini
in the root directory of the site. We can do this with slightly different approaches in either an .htaccess
file or wp-config.php
, but let’s continue down this rabbit hole and assume we’re absolutely bent on editing the php.ini
file.
But where the heck is the root directory in a local development environment powered by Flywheel’s Local app? There isn’t really a “root” directory, per se, other than the /public
directory.
Do you add a new php.ini
file in there or something? No, what we actually need to do is look in the /conf
directory rather than /app
and there we’ll find an existing file.
And that’s where we can update all kinds of imposed limits on things.
max_execution_time = 1200
max_input_time = 600
max_input_vars = 4000
memory_limit = 256M
post_max_size = 1000M
max_file_uploads = 20
output_buffering = 4096
Thanks to Tom McFarlin for publishing a clear and concise post outlining the fix.