Extended Memory Size has no effect

Hi There,

We have a client who pushes to the memory size limit. We temporarily extended the limit and it shows in the dashboard but we still get the following error message in our log file:

PHP Fatal error: Allowed memory size of 157286400 bytes exhausted (tried to allocate 154839 bytes) in /…/wp-includes/functions.php on line 316

What can we do?

Another question: Is it possible to extend the memory size for a single site?

Last question: The Limit was set to 2GB. Why is the memory size exhausted with 157286400 bytes?

Thanks, Tee

  • Alexander
    • DEV MAN’s Mascot

    Hello @Tee,

    Are you getting that error when accessing their site? Or is it just in the logs? Is it possible that this is just an older log entry?

    If you’re still having this issue, I’d recommend either getting in touch with your web host about increasing the limit, or auditing the site to see if there are any unnecessary plugins activated.

    Unfortunately there isn’t a way to change the limit per site. Technically speaking, WordPress Multisite is really just one web application. When the application is executed, the memory limit it already set in the configuration before it even knows which site it will be working with.

    Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.

    Best regards,

  • Alexander
    • DEV MAN’s Mascot

    Ok, another possibility is that you’re reaching the limit set by your webhost and modifying the limit in wp-config is really only taking you to the limit your host has in place. Have you contacted them? They might be able raise your memory limit.

    Take care

  • Alexander
    • DEV MAN’s Mascot

    Memory is quite different than storage

    You may have a certain amount of free space, but that’s storage space – not memory. Memory (or RAM) has to do with how much your server can be doing at once.

    Ok, this is a strange analogy, but think of it this way. Say your server could store a thousand apples. That’s storage. But how many of those apples can it juggle continuously without dropping them all? That’s memory. It’s a short term form of storage that’s used while pages are being loaded. With every extra plugin and feature added to WordPress, more memory is required.

    So by simply deactivating some plugins (you wouldn’t have to delete them) you can free up more memory.

    So, whatever you did earlier might not have actually extended the memory limit. In this case, one thing you can try is increasing the limit that WordPress uses. They provide instructions for this on the WordPress codex here:


    Try that, and if you’re still having problems, I’d really recommend asking your webhost to increase your server’s maximum RAM.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.