Php ini directives not always working despite reboot
wp_memory_limit is a WordPress variable and not a php.ini setting so that would need to be set in WordPress.
There is a php.ini setting called memory_limit which you can increase but be careful setting it too high if you don't have the hard resource limits features enabled.
If you are running LiteSpeed or OpenLiteSpeed the changes don't take effect instantly. This will be resolved soon but for now you can kill the PHP processes for that website or toggle the PHP version in the panel to make it work instantly. There is no need to reboot.
- Edited
Adam Ah voila thank you Adam! I was trying to set wp_memory_limit using Php.ini ;-)
I really thought I could and even read some docs online but probably got it wrong.
Here are my php.ini directives (WP hosting scenario) in case anyone spots a mistake, please don't hesitate to let me know:
- Edited
AdamM I have reduced it as per your suggestion.
I now remember why I chose 10000. I based it on wpengine (https://wpengine.com/support/platform-settings/) ;-)
That's what they write:
The default max_input_vars setting is 10000, indicating no more than 10,000 variables can be attached to any request.
This setting cannot be adjusted, as this is set at a platform level and higher values will have negative performance implications.
I also benchmarked and researched the php.ini directives for all major hosting providers and based mine as an average. By the way, take a look at the insane limits in Nexcess plans:
https://www.nexcess.net/help/php-ini-default/
max_execution_time 600
max_file_uploads 1024M
max_input_vars 16384
memory_limit 2048M
post_max_size 1536M
upload_max_filesize 1536M
Adrien insane limits
They look reasonable / not insane to me. There is little benefit in smaller values except for constrained (budge or resource) environments, especially if you're using other methods to prevent abuse and ensure stability. The cost of the server resources these days, is less than the cost of the human resources to answer the support ticket about changing it.
AdamM This is a security feature for DDoS
It is anti-DoS feature that is completely bypassed by DDoS (rather than 1x10,000 input DoS you'd just do a 10x1,000 DDoS if it were limited), there is little benefit in limiting this.