This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem:Where is WPML taking this PHP info from?

Solution:there are 2 concepts, the maximum memory that PHP allows (in php.ini) and the maximum memory that WP will use (ie: 40mb by default in the frontend for single sites)

if memory_limit in php.ini is set to -1 it means there is no limit on the PHP side

so one is taken by ini_get('memory_limit') and the other one from the WP_MAX_MEMORY_LIMIT

Relevant Documentation:

This topic contains 6 replies, has 2 voices.

Last updated by Vesselin Genadiev 2 months, 1 week ago.

Assigned support staff: Bobby.

Author Posts
July 31, 2019 at 4:12 pm #4316495

Vesselin Genadiev

Hello,

if I go to WPML > Support I see the following info in the PHP section (see the attachment Capture.JPG). I am wondering where from WPML is taking the value for memory limit of 256M, as in my php.ini file it is set to 128m (see Capture03.JPG)

July 31, 2019 at 5:53 pm #4317187

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

notice your Memory Limit under WordPress is showing 128M.

the PHP memory limit is i believe being controlled from within your wp-config.php file , if you set it to 128M there it should update within the support page as well.

it is recommended you used 256M or higher if you are using WPML String Translation

define('WP_MEMORY_LIMIT', '256M');
August 1, 2019 at 5:59 am #4318915

Vesselin Genadiev

That is the strange thing to me. In the wp-config.php file I have my memory limit defined to 128 MB (see the screenshot) and yet, WPML is getting this value of 256 MB, that is why I asked you, because I myself do not know where this value is taken from and I cannot find a reasonable explanation.

August 1, 2019 at 5:08 pm #4324333

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

there are 2 concepts, the maximum memory that PHP allows (in php.ini) and the maximum memory that WP will use (ie: 40mb by default in the frontend for single sites)

if memory_limit in php.ini is set to -1 it means there is no limit on the PHP side

so one is taken by ini_get('memory_limit') and the other one from the WP_MAX_MEMORY_LIMIT

August 2, 2019 at 8:46 am #4328231

Vesselin Genadiev

I see WP_MAX_MEMORY_LIMIT is supposed to be defined in wp-settings.php, but in my wp-settings.php file I haven't set that parameter. Does it mean that just WordPress 5.2.2 (this is my version) is taking by default 256MB when WP_MAX_MEMORY_LIMIT is not explicitely set?

August 2, 2019 at 5:01 pm #4331715

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

it just shows that one of your Memory Limits is 256M therefore if you have not set it , it must be set by default.

this tool is for debugging purposes to make sure that everything checks out according to our minimum requirements

you can continue with setting your Memory Limit as desired server side.

August 5, 2019 at 8:44 am #4339057

Vesselin Genadiev

My issue is resolved now. Thank you!