WordPress.org

Forums

Allowed memory size exhausted? (4 posts)

  1. leahs2
    Member
    Posted 4 years ago #

    I'm getting an error message on a new site I've never gotten before:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 17024 bytes) in /home/.../wp-includes/media.php on line 253

    Does this mean I am running out of memory? Or that this particular file is too large?

    Thanks for any advice!

  2. James Huff
    Volunteer Moderator
    Posted 4 years ago #

    Here are four ways to increase PHP's memory allocation:

    1. If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 32M try 64M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
    
    2. If you don't have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 64M
    
    3. Try adding this line to your wp-config.php file:
    Increasing memory allocated to PHP
    define('WP_MEMORY_LIMIT', '64M');
    
    4. Talk to your host.
  3. leahs2
    Member
    Posted 4 years ago #

    Thanks, James! Where is the PHP.ini file located?

  4. James Huff
    Volunteer Moderator
    Posted 4 years ago #

    You'll have to contact your hosting provider about that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.