If you issue the following command in terminal:

php --i | grep ini

This will show you the loaded pho configuration file. My output was this:

Loaded Configuration File:         /usr/local/etc/php/5.6/php.ini

But when I upgraded my MacOS from El Capitan to Sierra, updating the above file didn’t reflect any change on my development websites. WordPress was still showing 2 MB even though I was using the following:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

After googling here and there, I found a solution. Thanks to Gergely on stackoverflow here.

First use phpinfo to find out the current loaded file.

You would see:

Loaded Configuration File  None

now open your terminal:

cp /etc/php.in.default /etc/php.ini

Thats it. Make any change to the newly copied file and it would update in the webserver without any issues 🙂

Original Article: http://www.ahmadmushtaq.com/php-ini-not-updating-in-an-apache-on-mac-setup/

2 Replies to “Fix PHP.INI In An Apache Mac Setup”

  1. ahmadmushtaq
    October 2, 2018 3:36

    nice post

  2. ahmadmushtaq
    October 2, 2018 3:36


Leave a Reply

%d bloggers like this: