WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Tip: try fixing "memory exhausted" errors in .htaccess rather than wp-config.php (3 posts)

  1. riddle
    Member
    Posted 3 years ago #

    A co-worker solved a problem for me which I didn't see addressed in the Codex and only found in the Forums after the fact, so I thought I'd pass it along.

    The problem: after I upgraded to WP 3.0.1, I got the dreaded "memory exhausted" error.

    Fatal error: Allowed memory size of 16777216 bytes exhausted (tried
    to allocate 393216 bytes) in
    /export/httpd/vhosts/xxxxxxxx/data/wp-admin/menu.php on line 235

    The suggestion in numerous forum posts is to raise the memory limit in wp-config.php by inserting a line like this:

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

    However, that didn't work for me. The solution was to raise the memory limit in .htaccess instead:

    php_value memory_limit 32M

    After I knew the answer I found it embedded in various long threads in the Forums, such as this useful comment by MichaelH:

    http://wordpress.org/support/topic/memory-exhausted-error-in-admin-panel-after-upgrade-to-28?replies=67#post-1100315

    Maybe this belongs in the FAQ? The only reference to .htaccess memory_limit I see in http://codex.wordpress.org/FAQ_Working_with_WordPress is in reference to imports rather than "memory size exhausted" errors.

  2. Samuel B
    moderator
    Posted 3 years ago #

    as a member here - you can add to / edit the codex
    just log in with same credentials as here and do it

  3. ikeike
    Member
    Posted 3 years ago #

    Hi :o)

    I`m a newbie to wordpress and very much like the script - however I have multi php memory errors when installing and or activating plugins ... I have scoured the web and tried editing wordpress files

    eg:
    1. in wp_config.php adding: define('WP_MEMORY_LIMIT', '64M');
    2. in wp_include/cache.php adding: ini_set('memory_limit','64M');
    3. creating php.ini local file adding: memory_limit = 64M

    Tried increasing the memory in php.ini and none of the above has cured the issue.

    If I edit htaccess to increase the memory the site dissapears completely!

    I have spoken to my web host who has also edited php.ini (in the same way as I had done) and again ... no joy! :o(

    I am running

    wordpress 3.1

    Can anyone help? or will I have to drop the idea of using WP (that would be a real shame....)

Topic Closed

This topic has been closed to new replies.

About this Topic