• I am trying to upload several hundred images but I get this error:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 12288 bytes) in /Applications/MAMP/htdocs/test/wp-includes/media.php on line 2751

    I have set ini_set(‘memory_limit’, ‘1024M’); and in php.ini (memory_limit = 1024M;)

    How to detect what is wrong ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @andisman,
    Please add the following line in the ‘wp-config.php’ file in the root.
    Note that you add this line at the very top of the file, just after the php tag.

    define('WP_MEMORY_LIMIT', '256M');

    Hope this helps! ??

    Thread Starter andisman

    (@andisman)

    Thank you for reply I have added this I forgot to mention … but it is still the same problem..

    Hello @andisman,
    Then you have an option: Try deactivating the plugins one at a time, along with checking your uploading images task. There must be a culprit plugin that’s absorbing memory more than required.
    Doing this, you’ll get the plugin that’s causing the error.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error: Allowed memory size in PHP when allocating less’ is closed to new replies.