WordPress also has a max memory setting that will prevent the full PHP limit from being used.
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
Note the WP_MAX_MEMORY_LIMIT set in wp-config.php which is usually 256M. You might need to check that value on your install.
Cheers.
Thread Starter
josba
(@josba)
Hi,
we’ve set that value before.
+++++
<?php
@ini_set(“memory_limit”,’512M’);
define(‘WP_MEMORY_LIMIT’, ‘512M’);
+++++
So unfortunately that doesn’t solve our problem.
Do you have any idea?
Thanks in advance.
Cheers.
You might have to check with your host. Sometimes they have master settings that override any custom settings made. Those master settings can prevent custom values that are provided. Different hosts also only allow custom settings through specific methods. For example, they might not honor custom settings in php code, but might honor modifications to the php.ini file or .htaccess file. You might have to experiment with different methods to get the setting to stick. You can use a dummy php file with the phpinfo() function in it to check the actual settings that are taking effect. There are plugins that allow you to get the results of phpinfo() in the WP dashboard if you don’t want to do it in code yourself. And if you don’t see what you expect in the results of that, you’ll have to check with your host on how to get those limits set.
Cheers!
I had to set both in wp-config.php for it to work:
define(‘WP_MEMORY_LIMIT’, ‘1500M’);
define(‘WP_MAX_MEMORY_LIMIT’, ‘1500M’);
That’s correct. Setting only the PHP memory limit will not make sure WP will use it all. You have to set both to ensure that WP can access everything that PHP will allow. Thanks for posting your fix!