NO BUG: Regarding the memory limit in the rental server and the memory limit in bricks “System information” is not reflected correctly

[Question] Regarding the memory limit in the rental server and the memory limit in bricks “System information” is not reflected correctly.

I’m using version 1.9.4.

I followed the video below and checked with the rental server company.

Bricks - Getting Started (Installation, Settings, Editing)

Dashboard screenshot
bricks
→System information
→WordPress environment
→WP memory limits:40MB

Screenshot of memory limit in rental server
→php.ini settings
→Other settings

I contacted the rental server and was told that it had been changed to 1GB.

When I set up a domain on a rental server, it seems that the memory is automatically set to 1GB.

■ Question 1
Does the memory I am pointing out in the rental server match the “WordPress environment” in the dashboard “bricks”?

■ Question 2
Does the “WordPress environment” in the dashboard “bricks” reflect the value of “memory_limit” in the rental server’s “php.ini settings”?

I think it may not be reflected because there is a difference between WordPress memory and just memory.

I also thought it might have something to do with the compatibility of bricks with the rental server I’m using.

I’m not very familiar with computers.

Therefore, it may not be a bug.

If it’s not a bug, I apologize.

For now, I feel that I can continue creating the site normally with 40MB and the yellow text.

For bricks users, is “WordPress environment” in “bricks” turned green?

Is there anyone like me who creates a site by leaving the memory limit field with 40MB written in yellow text?

I would like to thank you in advance for those who respond.

Hi,
I have the same issue on all my websites, on different hosting companies.
The detected memory in Tools > Site Health > Info > Server matches the server php memory, but the memory detected by Bricks in the System information tab doesn’t (it says 40MB).

However, I also noticed the same issue in another plugin (MainWP) that I have on a WP site without Bricks installed. In the info section of this plugin, it also says that the memory is 40MB. So maybe not related to Bricks!

I’m interested as well to know if anyone has an idea what could cause this problem !

Hi @eekslash ,

As per your screen shot, the PHP memory limit is showing 1G, which is correct.

WP Memory limit and PHP Memory Limit are 2 different things.
If you want to set WP Memory Limit, please define this in wp-config.php

define('WP_MEMORY_LIMIT', '1G');

Regards,
Jenn

1 Like

ACTUAL SOLUTION:

go to the folder “wp-includes”
open “default-constants.php”
search for “define( ‘WP_MEMORY_LIMIT’, ‘40M’ );”

set the value you want
have fun

That’s not a good practice since the core files might get overridden with an update.
Usually, you do this in the wp-config.php, as Jenn already mentioned.

Adding the code line to wp-config.php don’t work in my website, It still say 40M

Any suggestion?

I found the solution.

At first I thought it was a problem with the variable in the php.ini but it was set well there too.

I inserted the define for the memory limit in the wp-config.php file but it didn’t work, it remained at 40M.

Reading in other forums I finally understood that the problem is caused by the position of the line within wp-config.php.
In every guide I had read before it was written to add it at the bottom of the code but it didn’t work this way.

The solution is very simple, just paste the instruction under the debug line and you’re done.

Therefore, you need to identify the following instructions:

if ( ! defined( ‘WP_DEBUG’ ) ) {
define( ‘WP_DEBUG’, false );
}

and paste just after the define statement for the memory limit:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

Everything works without modifying the WordPress core files.