-
Notifications
You must be signed in to change notification settings - Fork 1k
default WP_MEMORY_LIMIT & WP_MAX_MEMORY_LIMIT values #6123
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
After an update in the mainWP plugin I get a Fatal error that RAM is exhausted when I try to execute a WP cli command. I have tried to execute this command disabling on the fly this plugin using a must-use plugin...worked!
Also worked when I placed in wp-config the below code
if (defined('WP_CLI') && WP_CLI) { define('WP_MEMORY_LIMIT', '-1'); define('WP_MAX_MEMORY_LIMIT', '-1'); }
But why you don't add these constants as defaults when WP CLI is running?
The scope of WP CLI is to run without limits and it is frastrating if I call WP_MEMORY_LIMIT constant and this has value 256M according to default WP constants...
Describe how other contributors can replicate this bug
I cannot help you replace this bug, because this is part of my customizations in a website
Provide a possible solution
I suggest adding default WP_MEMORY_LIMIT & WP_MAX_MEMORY_LIMIT to -1 when WP_CLI is running