2

I am learning to use wordpress and I'm trying to adjust the php.ini file to adjust the configuration for the minimum server requirements of my template. I am running MAMP 4.4.1 and Wordpress 4.9.4 on MAC osx High Sierra.

I have a fresh install of both and would like to update the following:

memory_limit 96M

max_input_vars 3000

max_execution_time 120

post_max_size 32M

upload_max_filesize 32M

When I navigate to "http://localhost:8888/MAMP/index.php?language=English&page=phpinfo"

I see

Configuration File (php.ini) Path

/Applications/MAMP/bin/php/php7.2.1/conf

Loaded Configuration File
/Applications/MAMP/bin/php/php7.2.1/conf/php.ini

I run sudo nano /Applications/MAMP/bin/php/php7.2.1/conf/php.ini and edit the attributes listed above and comment out opcache. I then stop the server and start the server. When I view phpinfo again the values have not changed.

How can I change the php.ini?

NanoVector
  • 21
  • 4

1 Answers1

0

Original answer: Where does MAMP keep its php.ini?


I'm not sure if in MAMP (non-PRO) is the same, but MAMP overrides the modified php.ini everytime it starts.

In my case, I needed to use the MAMP menu to change my php.ini file (File -> Edit Template -> PHP -> PHP 5.xx -> php.ini)

henriquehbr
  • 1,063
  • 4
  • 20
  • 41
  • I looked in MAMP (non pro) and there is no such option. So I switched over to MAMP Pro and the highest version of PHP available to me is 7.1.2 instead of 7.2.1. It’s php.ini file (following the answer above) doesn’t have max_input_var as an option. So I added it and when I restart (stop/start) MAMP PRO I still see the original configuration. My Mac has php 7.1.1 on it independent of any MAMP instance. Would this have an effect? – NanoVector Apr 09 '18 at 12:02