Fatal error: Allowed memory size of 67108864 bytes exhausted

Dear Sir,

After I bulk activity a lot plugins,the systerm have fatal error,

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 77824 bytes)


Pro Sites—-

I see have error in Pro Sites, So I deleted Pro Sites plugins.

The site still have Fatal error:

Now the site total down. I can not log in, and the site not show up.

What I should do. How I could recover the sites.

Thank you so much.


Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 77824 bytes)in /home/content/99/11123299/html/wp-content/plugins/marketpress/marketpress-includes/plugins-gateway/paypal-express.php on

line 951


Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 311296 bytes) in /home/content/99/11123299/html/wp-content/themes/blogs-mu/_inc/functions/options-functions.php on line 586


Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /home/content/99/11123299/html/wp-includes/widgets.php on line 774


Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 113209 bytes) in /home/content/99/11123299/html/wp-includes/wp-db.php on line 885

  • Alexander
    • DEV MAN’s Mascot

    Hi @hi999,

    These are memory errors that occur when you have too many active plugins. If you’re still locked out of your site, you’ll want to connect via FTP or login to a file manager and delete some of the plugins. This should get you back into your dashboard.

    From here, you could try increasing the memory limit to allow your WordPress site to have more plugins active at once. This involves modifying your wp-config.php file. Here are the official instructions on the WordPress Codex: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    This usually works, but often you will actually need to get in touch with your web host to increase the limit.

    Let me know if you need any other help here! Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.

    Best regards,

  • hi999
    • The Crimson Coder

    Hi Alexander,

    Thank you for nice help.

    I look over and over in wp-config.php not find define(‘WP_MEMORY_LIMIT’, ‘xxM’ );

    I tried to searching into that file but I found nothing!

    Final This link help me find wp-includes/default-constants.php , after I change to

    define(‘WP_MEMORY_LIMIT’, ‘256M’ ); the website is OK now.

    http://www.hacking-tutorial.com/tips-and-trick/how-to-change-wp_memory_limit-on-wordpress-3-1/

    Actually on WordPress 3.1 the WP_MEMORY_LIMIT configurations is located at

    wp-includes/default-constants.php

    global $blog_id;

    // set memory limits

    if ( !defined(‘WP_MEMORY_LIMIT’:wink: ) {

    if( is_multisite() ) {

    define(‘WP_MEMORY_LIMIT’, ’64M’:wink:;

    } else {

    define(‘WP_MEMORY_LIMIT’, ’96M’:wink:;

    }

    }

    Thank you!

  • hi999
    • The Crimson Coder

    Hi wpmudev,

    After the site is ok but have

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Thank you!

  • Alexander
    • DEV MAN’s Mascot

    @hi999,

    Regarding the wp-config file, if that statement doesn’t exist, it’s ok to create it. This is still true for WordPress 3.1 I’m sorry for not being more clear on the issue earlier.

    To be honest, the author of the article you reference is wrong and misleading. By changing that file, you’ve modified the core of WordPress, so if there’s an update to WordPress you could lose those changes. All that the code referenced there actually does is set the default memory limit if one hasn’t already been declared in wp-config.

    So for example, it’s safe to add this to your wp-config.php and not need to edit the file.

    define(‘WP_MEMORY_LIMIT’, ‘256M’:wink:;

    As for your Internal Server Error, you say the site is also working? When do you get this error? Is it on every page, or only certain parts of the site? It’s possible that this was caused by modifying the other file.

    Best regards

  • hi999
    • The Crimson Coder

    Thank you so nice, your team really do very good job, and save people ton of time and thousands of dollar from your project.

    I first tried to add wp-config.php define(‘WP_MEMORY_LIMIT’, ‘256M’:wink:;

    but I can not find WHERE TO ADD THAT LINE, my wp-config.php no WP_MEMORY_LIMIT’, ‘xxM’:wink:;Please let me know detail where to add.

    Your are right, now have many error,when I go to plugin,themes and the site down again.

    Thank you!

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 33491 bytes) in /home/content/99/11123299/html/wp-includes/functions.php on line 251


    http://xxxx.com/wp-admin/network/themes.php?theme_status=enabled

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Apache Server at xxx.com Port 80


    http://xxxx.com/wp-admin/network/plugins.php

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 56383 bytes) in /home/content/99/11123299/html/wp-includes/functions.php on line 251

  • hi999
    • The Crimson Coder

    Dear Sir,

    I add define(‘WP_MEMORY_LIMIT’, ‘256M’:wink:; to that line is OK??

    Now looks the website in work.

    I still need change anything?

    Thanks!


    * @package WordPress

    */

    define(‘WP_MEMORY_LIMIT’, ‘256M’:wink:;

    // ** MySQL settings – You can get this info from your web host ** //

    /** The name of the database for WordPress */

    define(‘DB_NAME’, ‘a4h1314011274777’:wink:;

  • hi999
    • The Crimson Coder

    Dear Sir,

    Your link also no detal WHERE to add

    define(‘WP_MEMORY_LIMIT’, ‘256M’:wink:;”

    I know to add to WP-config.php, but where, which line to add???

    I serch a lot of time, not find


    Now the site have error too, and can not word at adminsite.

    Thanks!

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 56383 bytes) in /home/content/99/11123299/html/wp-includes/functions.php on line 251

  • Alexander
    • DEV MAN’s Mascot

    Hello again,

    With this it really doesn’t matter all that much where you put it, but I would recommend above the “That’s all, stop editing!” line. Like this:

    define('WP_MEMORY_LIMIT', '256M');
    /* That's all, stop editing! Happy blogging. */

    Ok, as for the 500 error that looks just like it’s one and the same here and fixing the memory issue will resolve it.

    You’ve already increased the memory limit in your wp-config file and you’re still having this problem. It’s most likely that the limit is happening from how PHP is configured on the server. So, at this point you need to either get more memory, or use less of it. Here’s what I recommend:

    1. Contact you web host and request they increase the RAM limit

    (or)

    2. Do an audit of your plugins and deactivate any unless you really need them.

    Some webhosts are willing to increase the limit, so you may want to try there first. Hope this helps!

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

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.