i have been looking on this url https://webinoly.com/en/documentation/webinolys/ it is shared here how to increase WP_MAX_MEMORY_LIMIT that is the commend php-max-mem to be included on /opt/webinoly/webinoly.conf however my question is how could i add WP_MEMORY_LIMIT ? is there a config for this?
Do you mean variable WP_MEMORY_LIMIT? that is my question since WP_MAX_MEMORY_LIMIT variable is php-max-mem in /opt/webinoly/webinoly.conf
I was thinking if I would be increasing WordPress WP_MEMORY_LIMIT? is there a config for this? a user named handpressed answer is a workable solution but I was just wondering if there is a global configuration for this so we don't need to edit wp-config.php for all sites every timeThanks,
First of all, WP_MAX_MEMORY_LIMIT is NOT the same as php-max-mem, Webinoly docs never mention it.
And no, I don't know how to define server-wide WordPress variables.
Here is a link to a short and good explanation:
thanks for the response, yes that's the same guide I check before I post this question,
and with regards to your statement that WP_MAX_MEMORY_LIMIT and php-max-mem are not the same, uhm but looks like it has the same function or let's say effect? ( could you please elaborate why this is so? )screenshot from server
screenshot from wordpress
what I have been trying to solve and asked if it's possible to set this WP LIMIT to higher value ( to all sites via webinoly )
currently only achievable by adding on define( 'WP_MEMORY_LIMIT', '128M' ); wp-config.php file, mannually per site..
Why do you feel there's a need to increase PHP memory usage globally for every WordPress site on your server? In my 15 years of using and developing with WordPress, I haven't had to worry about the WP_MEMORY_LIMIT setting that often. Surely it's an advantage to have such fine grain control over each site's PHP memory usage? I think so anyway.
From the post linked above:
As is often the case with computing resources, setting a higher memory limit doesn’t necessarily increase the performance of your WordPress site. Since WP_MEMORY_LIMIT controls memory allocation PER SCRIPT, it’s actually in your best interest to set it as low as possible to reduce the chance of a rogue script saturating the RAM in your server.
Documentation is very clear, also you can read the WordPress Codex about this topic.
Ok, I do understand your point,
what i simply express on this inquiry is wp_memory_limit is wordpress wp-config variable and as wordpress utilized PHP so it still relies to memory_limit (php-max-mem) settings on the server so whatever changes applied to global PHP settings php-max-mem will be applicable to all wordpress unless limited by a variable in wp-config by wp_memory_limit,
we place it that these 3 variables are different, yes that is a correct argument however both wp_memory_limit and memory_limit share the same purpose,
I understand, but I choose not to discuss the reason here on this thread as it would be out of topic, has something to do with WooCommerce optimization
You can increase the WP_MEMORY_LIMIT for individual sites by adding a constant to the site's wp-config.php file, e.g.:
define( 'WP_MEMORY_LIMIT', '128M' );
What's the difference between WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT?
Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.