Admin Allowed memory size exhausted


I am having a wordpress installation for a website with 90k+ posts, using the server stack from and hosted on Linode.
Everything works perfectly with no issues except when I try to edit any "page" in the website I get the following error
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 268435464 bytes) in /srv/users/serverpilot/apps/site-name/public/wp-includes/post.php on line 4362

I have edited the WP_MEMORY_LIMIT and the WP_MAX_MEMORY_LIMIT and set them to the max (2024MB) and tried even more, but I still get the same error.

I researched Google and tried many of the different solutions posted by other developer for the same issue but most of them only suggests the WP_MEMORY solution which is not really working.

P.S. the error message appears exactly inside the "Page Attributes" box and the page does not completely loads, it just stops.

Any suggestion on that?


  • Predrag Dubajic

    Hey Mohammad,

    Hope you're doing well today :slight_smile:

    You should note that some servers are not allowing certain ways of increasing memory limit, for example some will not allow you to do it via .htaccess method so even if you add the code there it will take no effect.
    Have you checked with your host to see what would be best way to increase memory limit for your site?

    Also, have you performed basic troubleshooting by disabling your plugins and switching to default WP theme to see if anything from there could be causing this?

    Best regards,

  • Milan

    Hello Mohammad

    Hope you are well today ?

    I have also tried to disable all installed plugins, but that did not change anything regarding the issue.

    Have you tried Theme conflict test ? if not then please test with default wordpress standard themes.

    The error message I pasted was after i restored the memory to the default, but it still appeared even when I changed the memory limit

    If changing memory limit is fixing your issue then why you are restoring it back to default ? And which memory limit is fixing your issue ? I am not getting your point here. Could you please elaborate this bit more ?

    Looking forward to hearing back!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.