possible inaccuracy of php memory limit ?

hi, i contacted siteground to confirm if i am using 512mb php memory limit which is allowed on their "go geek" plan because i was only seeing 256mb in wpmudev dashboard system info.
i added the usual code in wp-config to increase but i kept on seeing 256.
support gave me a link, the domain in question followed by .php which showed 512mb indeed.

so basically is there a difference ?
ie. am i referring to two different things mistakenly ?
under the "wordpress" tab of wpmudev dashboard "system info" i do indeed see 512mb for "WP_MEMORY_LIMIT"
can you please debunk this for me ?
is there a difference for php memory limit and WP_MEMORY_LIMIT and if so what exactly ?

kind regards.

  • Sajid

    Hi @rc5,
    Hope you are doing good today :slight_smile:

    The only difference between these two is that WP_MEMORY_LIMIT will adjust PHP memory limit for WordPress only. That means scripts/plugins/themes are restricted to that memory allocation.

    If you have any other PHP application outside of WordPress then this setting will not affect for it.

    See Increasing memory allocated to PHP section on editing wp-config.php on codex for more details.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:
    Cheers, Sajid

  • amused

    thanks for the reply.
    i understand the part about applying the code to only allow wordpress to utilize 512mb
    but this still does not answer my main question in the heading.

    POSSIBLE INACCURACY OF PHP MEMORY LIMIT ?

    site ground said they cannot confirm if wpmudev plugin is giving the correct figures as they obviously do not support the plugin.
    the point is they are insisting and have shown that i can and am using 512mb
    but yet still wpmudev plugin is still showing 256mb
    so my question is why ?
    why is wpmudev dashboard plugin showing 256mb as shown in the screenshot above even though i entered the code and they insist 512mb is being used/offered ?

    support access granted if needed

  • Nithin

    Hi @rc5

    Hope you are doing good today. :slight_smile:

    What WP_MEMORY_LIMIT basically does is set the memory needed for the specific WordPress website within the range of your server memory.

    WPMU DEV dashboard plugin, uses the PHP core functions to pull the data configured in your PHP setup. What you see as shown in your screenshot are directives set in your PHP.ini file of your server.

    If you have access, can you please confirm what are your memory limits declared in PHP.ini and .htaccess. If you aren't able to access these files, you may find these files declared in your root folder.

    There could also be a possibility of memory limits declared in PHP.ini & .htaccess located in your root folder of your WordPress installation to override these settings.

    You can see the memory_limit declared in PHP.ini, for eg:

    memory_limit = 256M ; Maximum amount of memory a script may consume

    Also, please check .htaccess file for such declaration, eg:

    php_value memory_limit 256M

    Please let us know with what you find. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.