Skip to content

default WP_MEMORY_LIMIT & WP_MAX_MEMORY_LIMIT values #6123

@pexlechris

Description

@pexlechris

Bug Report

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions