How do you change php.ini values in MAMP Pro?

Andrew picture Andrew · Jun 15, 2016 · Viewed 12.5k times · Source

MAMP Pro has separate php.ini files for each PHP version but when I edit the file and restart the server nothing has actually changed.

Specifically I'm trying to change PHP upload values:

post_max_size = 256M
upload_max_filesize = 256M
max_execution_time = 300
max_input_time = 300
memory_limit = 512M

But I have tried changing other php.ini values as a test but those changes aren't respected by PHP either.

Answer

Andrew picture Andrew · Jun 15, 2016

It turns out that browsing to the files and editing them directly is not the best way, you should use MAMP's built-in Template Editor.

You can turn this on by going to:

File > Edit Template > PHP > The PHP version you're running

If you can't see the File menu at all, it could be that you have the Hide Dock Icon preference set. In this case you'll need to uncheck that preference, restart MAMP, then use the template editor to tweak my php.ini file, save, restart Apache, done!