Question

I've installed WordPress on my localhost Mac OSX Yosemite box. I'm getting error:

The uploaded file exceeds the upload_max_filesize directive in php.ini

phpinfo() reports upload_max_filesize = 2M

I noticed that there was no php.ini inside the wp-admin folder of the WordPress default install, so I placed one there with upload_max_filesize = 64M.

I placed the php.ini into the wp-admin directory of the site I'm working. Unfortunately, I still get the error message. And phpinfo() file located in root directory of the site still reports upload_max_filesize = 2M

Any ideas how to resolve? The only other php.ini file I have is under:

private/etc/php.ini.default

I've edited that one to 64M as well, but no change in phpinfo() still.

The WP install is a brand new zip of 4.3.1 from wordpress.org

Était-ce utile?

La solution

As you discovered php.ini is not part of WordPress but rather a file that exists in your local environment.

Once you track down the correct php.ini file and make the change to the upload_max_filesize parameter you may need to restart your local Apache instance.

That being said though, I'm not sure the file you mentioned is the correct file since it has the .default extension.

Are you running the native LAMP stack that comes on Yosemite or did you use a third-party tool to get your local environment up and running? Examples of third-party installers include MacPorts, Homebrew, XAMPP, MAMP, manual installs.

Each one is a little different so knowing that bit of info will help you track down the location of your INI file.

Licencié sous: CC-BY-SA avec attribution
Non affilié à wordpress.stackexchange
scroll top