# Changes to php.ini values

**URL:** <https://community.localwp.com/t/changes-to-php-ini-values/343>\
**Category:** Support\
**Created:** [December 27, 2016, 2:49pm UTC](https://community.localwp.com/t/changes-to-php-ini-values/343 "2016-12-27T14:49:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tipinoncomuni](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tipinoncomuni](https://community.localwp.com/u/tipinoncomuni)\
**Post date:** [December 27, 2016, 2:49pm UTC](https://community.localwp.com/t/changes-to-php-ini-values/343/1 "2016-12-27T14:49:31Z")

</div>

I’m trying to get more than 256M in PHP.  
I’m on a Mac.  
I tryed to change the php.ini related to the site that needs the memory config, eg.:  
/users/giorgio/Local sites/mysite.dev/conf/php/7.0.3/php.ini  
The page  
[http://mysite.dev/local-phpinfo.php](http://mysite.dev/local-phpinfo.php)  
show that memory still limited to 256M

What i need to do to get 512M PHP memory for “mysite.dev”?

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [December 27, 2016, 5:39pm UTC](https://community.localwp.com/t/changes-to-php-ini-values/343/2 "2016-12-27T17:39:48Z")

</div>

Yup, you’re on the right track!

Did you restart the site after updating the configuration?

---

<div class="post-metadata">

**Author:** ![tipinoncomuni](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tipinoncomuni](https://community.localwp.com/u/tipinoncomuni)\
**Post date:** [December 27, 2016, 5:59pm UTC](https://community.localwp.com/t/changes-to-php-ini-values/343/3 "2016-12-27T17:59:25Z")

</div>

Yes i do 😟  
I also closed and restarted the App.

---

<div class="post-metadata">

**Author:** ![tipinoncomuni](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@tipinoncomuni](https://community.localwp.com/u/tipinoncomuni)\
**Post date:** [December 28, 2016, 9:08am UTC](https://community.localwp.com/t/changes-to-php-ini-values/343/4 "2016-12-28T09:08:02Z")

</div>

My backp plugin is showing me the memory limit when runs.  
I made some checks:

- change memory\_limit in conf/php/7.0.3/php.ini does not seems to have any effect.
- adding “php\_value memory\_limit 1024M” in .htaccess produce an apache config error
- writing “define(‘WP\_MEMORY\_LIMIT’, ‘1024M’);” in wpconfig, effectively changes the memory available to the plugin but (probably obvious) not the memory available to app/public/local-phpinfo.php  
So, i have “solved” my immediate problem but … it is a very strange behaviour

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [December 28, 2016, 11:04pm UTC](https://community.localwp.com/t/changes-to-php-ini-values/343/5 "2016-12-28T23:04:00Z")

</div>

Aha, makes sense now.

WordPress will attempt to set the PHP memory limit based off of `WP_MEMORY_LIMIT` if it’s allowed to do so using PHP’s `ini_set()` function.

There’s also `WP_MAX_MEMORY_LIMIT` that WordPress will set during admin requests and other requests such as backing up.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [August 25, 2020, 6:31pm UTC](https://community.localwp.com/t/changes-to-php-ini-values/343/6 "2020-08-25T18:31:20Z")

</div>

Closed on August 25, 2020, 6:31pm UTC


